test(sapere): resolve master merge conflicts and split LsaNode concurrency test into focused helpers#5325
Conversation
There was a problem hiding this comment.
Pull request overview
This PR strengthens the SAPERE incarnation’s LsaNode concurrency test by explicitly tracking submitted tasks and waiting on their completion via Future#get, aiming to make concurrency failures more reliably detectable.
Changes:
- Track submitted executor tasks via
List<Future<?>>and wait for completion with a timeout. - Convert previously in-task exception handling into main-thread handling via
Future#get. - Adjust writer-thread molecule naming used during concurrent modifications.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5325 +/- ##
=========================================
Coverage 61.53% 61.53%
Complexity 14 14
=========================================
Files 2 2
Lines 78 78
Branches 4 4
=========================================
Hits 48 48
Misses 24 24
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6690be6 to
c78d86a
Compare
Head branch was pushed to by a user without write access
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
8c4b6f9 to
39cdeac
Compare
22643a8 to
caa5285
Compare
bc27de4 to
ff02424
Compare
|
@copilot, Checkstyle rule violations were found. Fix them, and confirm that this PR works with |
…model/sapere/nodes/LsaNodeConcurrencyTest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…model/sapere/nodes/LsaNodeConcurrencyTest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…List import, ensure executor shutdown in finally Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/6651c551-7d20-4a2c-aebc-a2f43f4054f8 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
…xplicitly Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/6651c551-7d20-4a2c-aebc-a2f43f4054f8 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
…model/sapere/nodes/LsaNodeConcurrencyTest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nation also fails If the try block (latch.await or task.get) throws an AssertionError, it is captured as primaryFailure. In the finally block, shutdownNow + awaitTermination runs unconditionally; any termination error is added as a suppressed exception on primaryFailure (preserving its stack trace) rather than replacing it. If there was no prior failure, the termination error is thrown directly as before. Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/5a82b660-ae48-43f3-a76d-95df9ff49832 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
Sort java.util.concurrent imports alphabetically: ExecutionException must precede ExecutorService and Executors. Fixes CodeFactor warning. Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/5eb06f04-3691-430c-80ba-6a5d3f60fd08 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
…rencyTest - Extract SECONDS constant to fix MultipleStringLiterals violation - Break long line 96 into multiline assertTrue call (LineLength violation) Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/7df0fdf1-93b9-493f-b6a6-07a3678bf857 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/7df0fdf1-93b9-493f-b6a6-07a3678bf857 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
Fixed in c2e2ebb (and the preceding commit d35357e). Two Checkstyle violations were resolved:
The |
|
@copilot remove all changes to dokka-cache |
|



This PR addresses two issues in the SAPERE concurrency test branch: rebasing/merging against
masterwith cache-related conflicts, and excessive complexity inLsaNodeConcurrencyTest.testConcurrentGetContentsAndModification(reported complexity: 20).The test behavior is preserved, but its control flow is decomposed to reduce method-level complexity and improve diagnosability.
Merge conflict resolution with
masterdokka-cachefiles were renamed/updated onmasterwhile removed in the branch.masterstate.Concurrency test complexity reduction
testConcurrentGetContentsAndModificationinto smaller units:runConcurrentTask)runWriterIteration)awaitTaskCompletion)waitForTask)Resulting structure (example)