You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: force-app/main/default/classes/main/cached-soql/SOQLCache_Test.cls
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -164,7 +164,7 @@ private class SOQLCache_Test {
164
164
// Verify
165
165
Assert.areEqual(2, Limits.getQueries(), 'Two queries should be issued. The second query should update cached record.');
166
166
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.');
168
168
Assert.isNotNull(profile, 'Profile should be not null.');
169
169
Assert.areEqual('System Administrator', profile.Name, 'The cached profile record should be "System Administrator".');
0 commit comments