Skip to content

Improve integration test wait efficiency - #6549

Draft
ctubbsii wants to merge 6 commits into
apache:mainfrom
ctubbsii:test-improvements
Draft

ctubbsii wants to merge 6 commits into
apache:mainfrom
ctubbsii:test-improvements

Conversation

@ctubbsii

Copy link
Copy Markdown
Member

Replace fixed-sleep polling loops with condition-based Wait.waitFor calls across several ITs.

Co-authored-by: OpenAI GPT-5.6 Luna

@ctubbsii ctubbsii added this to the 4.0.0 milestone Sep 18, 2026
Comment thread test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java Outdated
Comment thread test/src/main/java/org/apache/accumulo/test/ScanServerMetadataEntriesIT.java Outdated
Comment thread test/src/main/java/org/apache/accumulo/test/ScanServerMetadataEntriesIT.java Outdated
Comment thread test/src/main/java/org/apache/accumulo/test/ScanServerMetadataEntriesIT.java Outdated
@ctubbsii ctubbsii modified the milestones: 4.0.0-alpha-1, 4.0.0 Sep 24, 2026
@DomGarguilo

Copy link
Copy Markdown
Member

After looking at this PR I had the idea to reduce the default sleep time for Wait from 1s to 250ms. Thats in #6571. If that is merged it might simplify a lot of the cases in this PR.

Replace fixed-sleep polling loops with condition-based Wait.waitFor
calls across several ITs.

Co-authored-by: Dom G. <[email protected]>
Co-authored-by: OpenAI GPT-5.6 Luna
getRunningCompactionInformation(ctx, ecids);
originalRunningInfoRef.set(runningInfo);
return runningInfo.values().stream().anyMatch(rci -> rci.duration > 0);
}, 30_000, 250, "Compaction did not start");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Take a look at the method added in #6572. It added an overload that allows us to just provide an error msg and uses the default wait and sleep values which seems like it could simplify a lot of the cases touched in this PR. Along with #6571 which reduces the default wait time to 250ms might make this PR simpler as a whole.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Made a PR against this branch on your fork at ctubbsii#23 to fix the build and make these changes

This branch has not been deployed

No deployments
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