Skip to content

Fix test failure for ResourceClusterActorTest#861

Merged
hellolittlej merged 2 commits into
masterfrom
fix-test
Jun 6, 2026
Merged

Fix test failure for ResourceClusterActorTest#861
hellolittlej merged 2 commits into
masterfrom
fix-test

Conversation

@hellolittlej

@hellolittlej hellolittlej commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Context

It's a classic Mockito multi-threading race condition. The actor starts in @before and runs background threads. When the test calls when(mantisJobStore.getTaskExecutor(...)) at line 960, Mockito records that invocation — but a background actor thread can call loadAllDisableTaskExecutorsRequests on the mock between Mockito's "record call" and the .thenReturn(...), causing the return value to be associated with the wrong method.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Test Results

164 files  ±0  164 suites  ±0   10m 12s ⏱️ -56s
795 tests ±0  784 ✅ +2  11 💤 ±0  0 ❌  - 2 
795 runs   - 2  784 ✅ ±0  11 💤 ±0  0 ❌  - 2 

Results for commit 529ff14. ± Comparison against base commit b60f201.

♻️ This comment has been updated with latest results.

@hellolittlej hellolittlej merged commit 254c035 into master Jun 6, 2026
5 checks passed
@hellolittlej hellolittlej deleted the fix-test branch June 6, 2026 00:17
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