Skip to content

Commit 0928f88

Browse files
author
Paul Gilmore
committed
Merge pull request #25 from PlayFab/master
Weekly SDK Publish
2 parents 9b4f0f4 + 5306ccf commit 0928f88

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

PlayFabApiTest.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ var PlayFabApiTests = {
1818
playFabId: null, // Filled during login
1919
characterId: null, // Filled during character-access
2020
testNumber: null, // Used by several tests
21-
testTimeStamp: null, // Used by several tests
2221
},
2322
testConstants: {
2423
TEST_KEY: "testCounter",
@@ -203,7 +202,6 @@ var PlayFabApiTests = {
203202
assert.ok(result.data.Data.hasOwnProperty(PlayFabApiTests.testConstants.TEST_KEY), "Testing GetUserData DataKey");
204203

205204
PlayFabApiTests.testData.testNumber = parseInt(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].Value, 10);
206-
PlayFabApiTests.testData.testTimeStamp = new Date(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].LastUpdated);
207205
PlayFabApiTests.testData.testNumber = (PlayFabApiTests.testData.testNumber + 1) % 100; // This test is about the expected value changing - but not testing more complicated issues like bounds
208206

209207
var updateDataRequest = {}; // Can't create this until we have the testNumber value
@@ -224,10 +222,13 @@ var PlayFabApiTests = {
224222
assert.ok(result.data.Data.hasOwnProperty(PlayFabApiTests.testConstants.TEST_KEY), "Testing GetUserData DataKey");
225223

226224
var actualtestNumber = parseInt(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].Value, 10);
227-
var actualTimeStamp = new Date(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].LastUpdated);
225+
var timeUpdated = new Date(result.data.Data[PlayFabApiTests.testConstants.TEST_KEY].LastUpdated);
228226

227+
var now = Date.now();
228+
var testMin = now - (1000 * 60 * 5);
229+
var testMax = now + (1000 * 60 * 5);
229230
assert.equal(PlayFabApiTests.testData.testNumber, actualtestNumber, "Testing incrementing counter: " + PlayFabApiTests.testData.testNumber + "==" + actualtestNumber);
230-
assert.ok(actualTimeStamp > PlayFabApiTests.testData.testTimeStamp, "Testing incrementing timestamp: " + actualTimeStamp + " > " + PlayFabApiTests.testData.testTimeStamp);
231+
assert.ok(testMin <= timeUpdated && timeUpdated <= testMax, "Testing incrementing timestamp: " + timeUpdated + " vs " + now);
231232
get2Done();
232233
};
233234

PlayFabSDK/PlayFabAdminApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if(!PlayFab.settings) {
1010
if(!PlayFab._internalSettings) {
1111
PlayFab._internalSettings = {
1212
sessionTicket: null,
13-
sdkVersion: "0.3.151116",
13+
sdkVersion: "0.4.151123",
1414
productionServerUrl: ".playfabapi.com",
1515
logicServerUrl: null,
1616

PlayFabSDK/PlayFabClientApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if(!PlayFab.settings) {
1010
if(!PlayFab._internalSettings) {
1111
PlayFab._internalSettings = {
1212
sessionTicket: null,
13-
sdkVersion: "0.3.151116",
13+
sdkVersion: "0.4.151123",
1414
productionServerUrl: ".playfabapi.com",
1515
logicServerUrl: null,
1616

PlayFabSDK/PlayFabMatchmakerApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if(!PlayFab.settings) {
1010
if(!PlayFab._internalSettings) {
1111
PlayFab._internalSettings = {
1212
sessionTicket: null,
13-
sdkVersion: "0.3.151116",
13+
sdkVersion: "0.4.151123",
1414
productionServerUrl: ".playfabapi.com",
1515
logicServerUrl: null,
1616

PlayFabSDK/PlayFabServerApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if(!PlayFab.settings) {
1010
if(!PlayFab._internalSettings) {
1111
PlayFab._internalSettings = {
1212
sessionTicket: null,
13-
sdkVersion: "0.3.151116",
13+
sdkVersion: "0.4.151123",
1414
productionServerUrl: ".playfabapi.com",
1515
logicServerUrl: null,
1616

0 commit comments

Comments
 (0)