Yakun Wang created OAK-11989:
--------------------------------

             Summary: Resolve the nondeterminism of 
testTraceLoggingForBulkUpdates() caused by order-specific assertion
                 Key: OAK-11989
                 URL: https://issues.apache.org/jira/browse/OAK-11989
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: docs, documentmk
            Reporter: Yakun Wang


The test function testTraceLoggingForBulkUpdates() in 
MultiDocumentStoreTest.java shows a non-deterministic behavior when the 
execution order is changed. The test sometimes fails with AssertionError. The 
root cause is that failedUpdates is returned as a set by SetUtils.difference(). 
When this set is converted to a string for logging in the TRACE log, the order 
of elements is non-deterministic. However, testTraceLoggingForBulkUpdates() 
checks the elements in a specific order as follows 
`assertTrue(logCustomizer.getLogs().get(0).contains("failure for [" + 
modifiedRow + ", " + deletedRow + "]"));`, causing the AssertionError.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to