Skip to content

Commit

Permalink
[bugfix] Test may complete in less than 1ms and so that timing should…
Browse files Browse the repository at this point in the history
… be taken into account
  • Loading branch information
adamretter committed Oct 10, 2024
1 parent 8238c97 commit 019b5db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void replaceXmlAsOwner() throws AuthenticationException, LockException, P
final long originalDoc1LastModified = getLastModified(USER1_DOC1);
Thread.sleep(5);
replaceXmlDoc(user2, NO_PRESERVE, USER1_DOC1, "<something>else</something>");
checkAttributes(USER1_DOC1, USER1_NAME, GROUP1_NAME, USER1_DOC1_MODE, equalTo(getCreated(USER1_DOC1)), not(originalDoc1LastModified));
checkAttributes(USER1_DOC1, USER1_NAME, GROUP1_NAME, USER1_DOC1_MODE, equalTo(getCreated(USER1_DOC1)), greaterThanOrEqualTo(originalDoc1LastModified));
}

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

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

0 comments on commit 019b5db

Please sign in to comment.