Skip to content

Remove Guice to fix flaky tests - #519

Open
mgaffigan wants to merge 1 commit into
OpenIntegrationEngine:mainfrom
mgaffigan:feat/singleton-test-hooks
Open

mgaffigan wants to merge 1 commit into
OpenIntegrationEngine:mainfrom
mgaffigan:feat/singleton-test-hooks

Conversation

@mgaffigan

Copy link
Copy Markdown
Contributor

Several tests would fail if run in a shared JVM depending on what tests ran before them. Traced to setting mocks without cleaning them up.

As it happens, those were the only uses of Guice in the system. Removed. Revised model matches the JavaScriptBuilder.setControllersForTesting precedent.

Found during #449

Several tests would fail if run in a shared JVM depending on what tests ran before them.  Traced to setting mocks without cleaning them up.

As it happens, those were the only uses of Guice in the system.  Removed.

Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Test Results

129 files  ±0  129 suites  ±0   4m 3s ⏱️ + 1m 22s
737 tests ±0  737 ✅ ±0  0 💤 ±0  0 ❌ ±0 
827 runs  ±0  821 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit 5dce3cb. ± Comparison against base commit fbda474.

♻️ This comment has been updated with latest results.

NicoPiel
NicoPiel previously approved these changes Oct 27, 2026

@NicoPiel NicoPiel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean ups:

  • Wrong copy-pasted comments. All four TODOs in DatabaseConnectionPoolTests say “leaks channelController”, but they are on the DonkeyConnectionPools, Donkey, ControllerFactory and SqlConfig overrides.
  • Stale Guice references left behind:
    • server/docs/thirdparty/THIRD-PARTY-README.txt:29 still lists “Guice 4.1”. The library no longer ships, so this line should go.
    • gradle/vendored-layout.json still has com.google.inject:guice (lines 132 and 186). It doesn’t break the build, because the check only fails on missing entries, but it’s dead config now.
    • gradle/verification-metadata.xml still has entries for guice, guice-parent and javax.inject:1. These are harmless but stale, and can be regenerated.

@mgaffigan

Copy link
Copy Markdown
Contributor Author

Oops. I was missing the push to remove the stale references.

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