Skip to content

TestKit: put the DotNetty batching override under akka.remote, where the transport reads it (re-land of #8546 with the RemoteConfigSpec fix) - #8561

Merged
Aaronontheweb merged 3 commits into
devfrom
fix/testkit-batching-override-under-akka-remote
Sep 11, 2026
Merged

Aaronontheweb merged 3 commits into
devfrom
fix/testkit-batching-override-under-akka-remote

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

What changes

Re-lands #8546, which was merged without a CI run and reverted in #8560, and folds in the RemoteConfigSpec adjustment from #8559. This PR runs CI the normal way.

  • src/core/Akka.TestKit/Internal/Reference.conf: the override remote.dot-netty.tcp.batching.enabled = false sat under akka.test, where nothing reads it, so it has been dead since it was written. It now sits under akka.remote, where DotNettyTransportSettings reads it. A test in TestKit_Config_Tests pins the path; it failed before the move and passes after.
  • src/core/Akka.Remote.Tests/RemoteConfigSpec.cs: the batching fact reads the Akka.Remote reference config directly, since that is what its name says it checks. A sibling fact reads the running test system and asserts the TestKit override is applied, so a future misplacement of either key fails a test.

What this changes at runtime, so it can be judged rather than discovered

With the override live, DotNetty batching is off in every ActorSystem the TestKit creates, which includes every TestKit-based remoting test and every multi-node spec, since MultiNodeSpec pulls in the TestKit default config. Two consequences:

  • The FlushConsolidationHandler leaves the pipeline for those tests. The shipped default, batching on, then has no end-to-end coverage in the test suites. If that matters, a handful of remoting specs should set batching.enabled = on explicitly.
  • Any remoting test whose timing was tuned with batching silently on now runs without it. The comment on the override says batching was turned off to reduce flakiness in low-frequency tests, which was the intent all along, but it has never actually been exercised.

The first CI run of this PR is the first time the remoting suites run with the override in effect. Read its multi-node lanes with that in mind before merging.

How it was checked

Akka.Remote.Tests and Akka.TestKit.Tests build with warnings as errors. RemoteConfigSpec: 11 passed. TestKit_Config_Tests: passes. Test-only change. No ledger entry.

…the transport reads it (#8546)

The key sat under akka.test and never took effect. A config test now guards it.

(cherry picked from commit d88eec8)
…ce config, and pin the TestKit override separately

Since #8546 moved the DotNetty batching override to where the transport reads it, the running test system's config now carries the TestKit's batching-disabled override, so it no longer reflects the Akka.Remote defaults. The BatchWriter fact now reads straight from Akka.Remote.Configuration.RemoteConfigFactory to pin the library default, and a new sibling fact reads from the running system to pin the TestKit override, so a future misplacement of either key fails a test.

(cherry picked from commit adacc74)
@Aaronontheweb
Aaronontheweb force-pushed the fix/testkit-batching-override-under-akka-remote branch from 42760f3 to 9f6b396 Compare September 10, 2026 19:50
@Aaronontheweb
Aaronontheweb merged commit 3f966aa into dev Sep 11, 2026
15 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/testkit-batching-override-under-akka-remote branch September 11, 2026 20:40
Aaronontheweb added a commit that referenced this pull request Sep 12, 2026
Adds a new #### 1.5.72 TBD #### section covering every user-visible change in this backport:
the TestKit.Xunit async dispose chain and its CS0114 source break (#8545), the DotNetty batching
override fix (#8561), the new TestKitBase.ShutdownAsync API (#8499), the MultiNodeTestRunner
conductor port race fix and its node-exit backstop (#8515), the Streams Tcp Unbind timing fix
(#8570), the Sharding remember-entities write-timeout fix with a migration note (#8574), the
Replicator.IsKnownNode fix (#8582), the ShardCoordinator hand-over fix (#8586), the LeaveSelf
re-send fix, and a one-line summary of the de-flaked specs.
Aaronontheweb added a commit that referenced this pull request Sep 12, 2026
Adds a new #### 1.5.72 TBD #### section covering every user-visible change in this backport:
non-blocking Cluster extension startup and its startup-ordering follow-up (#8359, #8580), the
TestKit.Xunit async dispose chain and its CS0114 source break (#8545), the DotNetty batching
override fix (#8561), the new TestKitBase.ShutdownAsync API (#8499), the MultiNodeTestRunner
conductor port race fix and its node-exit backstop (#8515), the Streams Tcp Unbind timing fix
(#8570), the Sharding remember-entities write-timeout fix with a migration note (#8574), the
Replicator.IsKnownNode fix (#8582), the ShardCoordinator hand-over fix (#8586), and a one-line
summary of the de-flaked specs.
This was referenced Oct 5, 2026
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.

1 participant