Skip to content

Conversation

@annhchen89
Copy link
Contributor

What does this PR do?

This PR is fixing a nondeterministic test failure in ConditionalMutationTest.testPrettyPrint() when running with Nondex.

Problem

The original test checked for a single concatenated string that included both iterators’ data in a specific order. This caused nondeterministic failures under NonDex, since the order of iterators is not guaranteed.

Reproduce Test

mvn -pl core edu.illinois:nondex-maven-plugin:2.2.1:nondex -Dtest=org.apache.accumulo.core.data.ConditionalMutationTest#testPrettyPrint

The Fix

Instead of asserting one long expected string that assumes a fixed iterator sequence, the updated test now extracts the iterator section and individually checks each iterator’s:

  • name
  • class
  • priority
  • and key-value options

This ensures the test verifies the logical presence of all expected iterator properties,
regardless of their order in the output string.

assertTrue(pp.contains("condition: " + FAMILY + ":" + QUALIFIER + " value: " + VALUE
+ " iterator: '" + iters[0] + "' '" + iters[1] + "'"));
assertTrue(pp.contains("condition: " + FAMILY + ":" + QUALIFIER + " value: " + VALUE));
String iterSection = pp.substring(pp.indexOf("iterator:"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious if this is a false positive as the iters object is an array, which is ordered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants