Skip to content

Conversation

@ohadzeliger
Copy link
Contributor

Reduce test load: Save fewer records, use fewer threads and adjust tests to account for the different counts.
Resolves #3711

@ohadzeliger ohadzeliger self-assigned this Oct 31, 2025
@ohadzeliger ohadzeliger added test failure A test is failing at least some of the time testing improvement Change that improves our testing labels Oct 31, 2025
commit(context);
}

System.out.println("=== initial ===");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Teamscale has findings, but is not reporting them back to PRs right now...
https://fdb.teamscale.io/activity/merge-requests/foundationdb-fdb-record-layer/FoundationDB%2Ffdb-record-layer%2F3712

It's complaining about these println calls, which can probably just be removed, and it's complaining about the length of this method, which I think went from 75 to 77 lines, which is more than the desired 50.

I think these all qualify as adjacent findings, but if you want to resolve them, it might be nice.
I suspect the println can be removed, and adding a

dataModel.saveRecords(loopCount, recordsPerIteration, contextProps, () -> openContext(contextProps)

would help, but maybe not enough to cross the threshold. I suspect getting it down more would either require changes that don't actually reduce the complexity, or putting more state into the data model (such as the contextProperties)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed some lines. The solution in the documentation in Teamscale for the method length problem is to "extract helper functions" which I think, in this case, is not greatly contributing to code legibility. It's also marked as "pre-existing", so I'd rather leave it as-is.

@ScottDugas ScottDugas merged commit 2ef17d2 into FoundationDB:main Nov 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test failure A test is failing at least some of the time testing improvement Change that improves our testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LuceneIndexMaintenanceTest.concurrent* are flaky

2 participants