Skip to content

Commit 850a0fc

Browse files
committed
Fix Unit Test
Signed-off-by: Piotr PG Gajek <[email protected]>
1 parent adfb188 commit 850a0fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

force-app/main/default/classes/main/cached-soql/SOQLCache_Test.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private class SOQLCache_Test {
164164
// Verify
165165
Assert.areEqual(2, Limits.getQueries(), 'Two queries should be issued. The second query should update cached record.');
166166
Assert.areEqual(1, updatedCacheItems.size(), 'The Apex transaction cache should contain exactly one record.');
167-
Assert.areEqual(System.now(), updatedCacheItems[0].cachedDate, 'The cached record should be updated.');
167+
Assert.isTrue(Math.abs((System.now().getTime() - updatedCacheItems[0].cachedDate.getTime()) / 1000) < 10, 'The cached record should be updated. The time difference should be less than 10 seconds.');
168168
Assert.isNotNull(profile, 'Profile should be not null.');
169169
Assert.areEqual('System Administrator', profile.Name, 'The cached profile record should be "System Administrator".');
170170
}

0 commit comments

Comments
 (0)