You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Yakun Wang (Jira)" <ji...@apache.org> on 2025/10/19 22:29:00 UTC

[jira] [Created] (OAK-11989) Resolve the nondeterminism of testTraceLoggingForBulkUpdates() caused by order-specific assertion

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)