diff --git a/Tests/LootLockerTests/PlayMode/PlayerFilesTest.cs b/Tests/LootLockerTests/PlayMode/PlayerFilesTest.cs index af193ca09..e2da5f273 100644 --- a/Tests/LootLockerTests/PlayMode/PlayerFilesTest.cs +++ b/Tests/LootLockerTests/PlayMode/PlayerFilesTest.cs @@ -378,6 +378,10 @@ public IEnumerator PlayerFiles_UpdateFile_CreatesNewRevision() yield return new WaitUntil(() => uploadDone); Assert.IsTrue(uploadedFile.success, "Initial upload failed"); + // Revision timestamps have second granularity, so revisions created within the same + // second are indistinguishable and their relative order is undefined. + yield return new WaitForSeconds(1f); + // When — update the file LootLockerPlayerFile updatedFile = new LootLockerPlayerFile(); bool updateDone = false; @@ -425,6 +429,10 @@ public IEnumerator PlayerFiles_GetFileRevision_ReturnsSpecificRevision() yield return new WaitUntil(() => uploadDone); Assert.IsTrue(uploadedFile.success, "Initial upload failed"); + // Revision timestamps have second granularity, so revisions created within the same + // second are indistinguishable and their relative order is undefined. + yield return new WaitForSeconds(1f); + // Update to create a second revision LootLockerPlayerFile updateResponse = new LootLockerPlayerFile(); bool updateDone = false; @@ -485,6 +493,10 @@ public IEnumerator PlayerFiles_PromoteFileRevision_RestoresOldRevision() yield return new WaitUntil(() => uploadDone); Assert.IsTrue(uploadedFile.success, "Initial upload failed"); + // Revision timestamps have second granularity, so revisions created within the same + // second are indistinguishable and their relative order is undefined. + yield return new WaitForSeconds(1f); + // Update to create revision 2 LootLockerPlayerFile updateResponse = new LootLockerPlayerFile(); bool updateDone = false; @@ -607,6 +619,10 @@ public IEnumerator PlayerFiles_GetFileRevisionByKey_ReturnsSpecificRevision() yield return new WaitUntil(() => firstDone); Assert.IsTrue(firstUpload.success, "First upload for get revision by key test failed"); + // Revision timestamps have second granularity, so revisions created within the same + // second are indistinguishable and their relative order is undefined. + yield return new WaitForSeconds(1f); + LootLockerPlayerFile secondUpload = new LootLockerPlayerFile(); bool secondDone = false; LootLockerSDKManager.UploadPlayerFileByKey(pathB, "test", true, fileKey, response => @@ -664,6 +680,10 @@ public IEnumerator PlayerFiles_PromoteFileRevisionByKey_PromotesRevision() yield return new WaitUntil(() => firstDone); Assert.IsTrue(firstUpload.success, "First upload for promote by key test failed"); + // Revision timestamps have second granularity, so revisions created within the same + // second are indistinguishable and their relative order is undefined. + yield return new WaitForSeconds(1f); + LootLockerPlayerFile secondUpload = new LootLockerPlayerFile(); bool secondDone = false; LootLockerSDKManager.UploadPlayerFileByKey(pathB, "test", true, fileKey, response =>