Skip to content

test(incarnation-sapere): harden LsaNode concurrency test#5325

Open
DanySK wants to merge 6 commits intomasterfrom
test/incarnation-sapere/hardenlsanodecon
Open

test(incarnation-sapere): harden LsaNode concurrency test#5325
DanySK wants to merge 6 commits intomasterfrom
test/incarnation-sapere/hardenlsanodecon

Conversation

@DanySK
Copy link
Copy Markdown
Member

@DanySK DanySK commented Apr 29, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 29, 2026 21:03
@DanySK DanySK enabled auto-merge (squash) April 29, 2026 21:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.53%. Comparing base (249a798) to head (c78d86a).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DanySK DanySK force-pushed the test/incarnation-sapere/hardenlsanodecon branch 6 times, most recently from 6690be6 to c78d86a Compare April 30, 2026 06:11
auto-merge was automatically disabled April 30, 2026 07:13

Head branch was pushed to by a user without write access

@DanySK DanySK requested a review from Copilot April 30, 2026 07:25
@DanySK
Copy link
Copy Markdown
Member Author

DanySK commented Apr 30, 2026

@codex review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@DanySK DanySK force-pushed the test/incarnation-sapere/hardenlsanodecon branch 2 times, most recently from 8c4b6f9 to 39cdeac Compare April 30, 2026 09:16
@DanySK DanySK requested a review from Copilot April 30, 2026 09:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +109 to +118
} finally {
executor.shutdownNow();
try {
if (!executor.awaitTermination(TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
throw new AssertionError("Executor did not terminate within " + TIMEOUT_SECONDS + " seconds");
}
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
throw new AssertionError("Interrupted while waiting for executor termination", e);
}
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The finally block can throw a new AssertionError if awaitTermination fails, which may mask an earlier failure from latch.await(...) or a task.get(...) exception (the original assertion/stack trace gets replaced). Consider capturing the primary failure, then performing shutdown/awaitTermination, and only throwing a termination error if there was no prior failure (or add it as a suppressed exception).

Copilot uses AI. Check for mistakes.
DanySK and others added 2 commits April 30, 2026 13:12
…model/sapere/nodes/LsaNodeConcurrencyTest.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
DanySK and others added 4 commits April 30, 2026 13:12
…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>
…model/sapere/nodes/LsaNodeConcurrencyTest.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DanySK DanySK force-pushed the test/incarnation-sapere/hardenlsanodecon branch from 2aa54ea to 22643a8 Compare April 30, 2026 11:12
@sonarqubecloud
Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants