Skip to content

4.x: Move TestHelper.race tests into @Isolated classes (flatMap/mergeWith batch) (#8075) - #8253

Merged
akarnokd merged 1 commit into
ReactiveX:4.xfrom
oaksprout:isolate-race-tests-flowable-flatmap-mergewith
Jul 29, 2026
Merged

4.x: Move TestHelper.race tests into @Isolated classes (flatMap/mergeWith batch) (#8075)#8253
akarnokd merged 1 commit into
ReactiveX:4.xfrom
oaksprout:isolate-race-tests-flowable-flatmap-mergewith

Conversation

@oaksprout

Copy link
Copy Markdown
Contributor

You set the work. #8075, and your go-ahead: move TestHelper.race uses into separate classes so they can run @Isolated, named <Original>IsolatedTest.java, movements and conversions in separate PRs.

It's done. First movements batch: the Flowable flatMap-to-{Maybe,Single,Publisher} / mergeWith-{Completable,Maybe,Single} family — 15 race-test methods moved out of 6 classes into 6 new @Isolated classes, following your naming pattern exactly. Kept deliberately small so you can veto the shape (batch grouping, class layout) before I produce the rest: 179 more files use TestHelper.race and can follow in whatever batch size suits your review.

Here's the evidence.

  • Fresh clone at b7946f24, patch applied, dependencies warmed, then the network was disconnected.
  • Scoped suite in a clean eclipse-temurin:26-jdk container (pinned digest, linux/arm64), network off: 211 tests across all 12 touched classes, 0 failures, 0 errors — per-class counts match the solve machine's run exactly. Full-tree compileTestJava clean.
  • checkstyleTest clean (that check ran with network on — the checkstyle jar wasn't pre-cached; stated for accuracy).
Audit trail — an independently checkable record that these checks ran, in this order, before this PR existed
Base commit b7946f24fc6ec1f6bc984bcc2810024efbad744e
Container eclipse-temurin:26-jdk@sha256:939e3577… (linux/arm64), network off during tests
The patch, content-addressed record
The verification result, signed by a second key record
Timestamped sequence work assignedwork deliveredchecks passed

What this proves: the checks ran, in that order, on exactly this patch, before this PR was opened — none of it can be backdated or swapped afterwards. What it doesn't prove: that the change is right. The two signing keys are distinct but run by the same project, and the record lives on a test network. Correctness is your judgement, which is the point.

Written by an AI agent; reviewed and sent by a human who answers the review — this one on your invitation in #8075.


Everything below is written by Claude

Part of #8075 (movements category only; conversions of manual racing tests will come separately as you specified).

Batch contents — moved TestHelper.race( methods per class:

Original Moved New class
FlowableFlatMapMaybeTest 3 FlowableFlatMapMaybeIsolatedTest
FlowableFlatMapSingleTest 2 FlowableFlatMapSingleIsolatedTest
FlowableFlatMapTest 3 FlowableFlatMapIsolatedTest
FlowableMergeWithCompletableTest 1 FlowableMergeWithCompletableIsolatedTest
FlowableMergeWithMaybeTest 3 FlowableMergeWithMaybeIsolatedTest
FlowableMergeWithSingleTest 3 FlowableMergeWithSingleIsolatedTest

Each new class is @Isolated, extends RxJavaTest, keeps the license header and package, and takes only the imports the moved methods need. Private helpers used solely by moved methods went with them; originals are otherwise untouched.

Notes for the reviewer

  • @Isolated is currently inert in this build: junit.jupiter.execution.parallel.enabled isn't set, so JUnit's parallel executor never runs and the annotation has no observable effect yet. I read 4.x: Separate TestHelper.race uses so they can run @Isolated #8075 as prep for flipping that config later — if you'd rather this PR also enable parallel execution (or set it per-package), say so and I'll extend it.
  • TestHelper.raceOther( call sites (9 files) were excluded as out of scope, since the issue names TestHelper.race specifically — flag if you want them included in the movements category.
  • Batch grouping (one operator family per PR) is my choice, not something the issue specifies. Happy to switch to per-class PRs or bigger batches — 179 files remain.

@github-actions

Copy link
Copy Markdown

🐷 TruffleHog + Entropy Beauty Scan

Average entropy of changed code: 4.745 bits/char
Verdict: ⚠️ Consider review — entropy outside sweet spot

Changed files entropy:

src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableFlatMapIsolatedTest.java: 4.689
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableFlatMapMaybeIsolatedTest.java: 4.852
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableFlatMapMaybeTest.java: 4.764
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableFlatMapSingleIsolatedTest.java: 4.908
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableFlatMapSingleTest.java: 4.770
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableFlatMapTest.java: 4.668
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableMergeWithCompletableIsolatedTest.java: 4.873
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableMergeWithCompletableTest.java: 4.774
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableMergeWithMaybeIsolatedTest.java: 4.752
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableMergeWithMaybeTest.java: 4.584
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableMergeWithSingleIsolatedTest.java: 4.739
src/test/java/io/reactivex/rxjava4/internal/operators/flowable/FlowableMergeWithSingleTest.java: 4.571

✅ No secrets or suspicious high-entropy strings found.

Mid-4 beauty heuristic in action — powered by our entropy chats! 😊

@akarnokd
akarnokd merged commit db01b1f into ReactiveX:4.x Jul 29, 2026
5 checks passed
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (b7946f2) to head (13f4cfb).
⚠️ Report is 1 commits behind head on 4.x.

Additional details and impacted files
@@            Coverage Diff            @@
##                4.x    #8253   +/-   ##
=========================================
  Coverage     98.62%   98.62%           
- Complexity     7125     7128    +3     
=========================================
  Files           822      822           
  Lines         50690    50690           
  Branches       6892     6892           
=========================================
+ Hits          49992    49994    +2     
  Misses          476      476           
+ Partials        222      220    -2     

☔ View full report in Codecov by Harness.
📢 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.

@akarnokd

Copy link
Copy Markdown
Member

@isolated is currently inert in this build

build.gradle runs tests in parallel for sure because how it takes 7 minutes instead of 14.

TestHelper.raceOther

We'll look into them after you are done with TestHelper.race.

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