Skip to content

Commit 8696f13

Browse files
committed
[bugfix] Test may complete in less than 1ms and so that timing should be taken into account
1 parent a6af4a4 commit 8696f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exist-core/src/test/java/org/exist/storage/StoreResourceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void replaceXmlAsOwner() throws AuthenticationException, LockException, P
8686
final long originalDoc1LastModified = getLastModified(USER1_DOC1);
8787
Thread.sleep(5);
8888
replaceXmlDoc(user2, NO_PRESERVE, USER1_DOC1, "<something>else</something>");
89-
checkAttributes(USER1_DOC1, USER1_NAME, GROUP1_NAME, USER1_DOC1_MODE, equalTo(getCreated(USER1_DOC1)), not(originalDoc1LastModified));
89+
checkAttributes(USER1_DOC1, USER1_NAME, GROUP1_NAME, USER1_DOC1_MODE, equalTo(getCreated(USER1_DOC1)), greaterThanOrEqualTo(originalDoc1LastModified));
9090
}
9191

9292
/**
@@ -98,7 +98,7 @@ public void replaceBinaryAsGroupMember() throws AuthenticationException, LockExc
9898
final long originalDoc1LastModified = getLastModified(USER1_BIN_DOC1);
9999
Thread.sleep(5);
100100
replaceBinDoc(user2, NO_PRESERVE, USER1_BIN_DOC1, "something else");
101-
checkAttributes(USER1_BIN_DOC1, USER1_NAME, GROUP1_NAME, USER1_BIN_DOC1_MODE, equalTo(getCreated(USER1_BIN_DOC1)), not(originalDoc1LastModified));
101+
checkAttributes(USER1_BIN_DOC1, USER1_NAME, GROUP1_NAME, USER1_BIN_DOC1_MODE, equalTo(getCreated(USER1_BIN_DOC1)), greaterThanOrEqualTo(originalDoc1LastModified));
102102
}
103103

104104
private void replaceXmlDoc(final Subject execAsUser, final DBBroker.PreserveType preserve, final XmldbURI docName, final String content) throws EXistException, PermissionDeniedException, LockException, IOException, SAXException {

0 commit comments

Comments
 (0)