Skip to content

test: clean up TLS edge streams after early cancellation#3000

Merged
He-Pin merged 1 commit into
apache:mainfrom
He-Pin:fix/tls-edge-cleanup-after-early-cancel
May 28, 2026
Merged

test: clean up TLS edge streams after early cancellation#3000
He-Pin merged 1 commit into
apache:mainfrom
He-Pin:fix/tls-edge-cleanup-after-early-cancel

Conversation

@He-Pin
Copy link
Copy Markdown
Member

@He-Pin He-Pin commented May 28, 2026

Motivation

JDK 25 nightly builds time out in repeated TlsGraphStageEdgeCasesSpec early-cancellation scenarios because earlier materializations can keep draining after the expected bytes have been collected.

Modification

Materialize collectExactly with a KillSwitch and watch stream termination, then shut down and await the stream in finally after the expected bytes are collected.

Result

Repeated TLS edge-case checks do not leave prior materializations running in the same actor system.

Tests

  • JDK 25 nightly-style virtualized stream-dispatcher flags: stream-tests / Test / testOnly org.apache.pekko.stream.io.TlsGraphStageEdgeCasesSpec
  • scalafmt --mode diff-ref=origin/main --quiet
  • scalafmt --list --mode diff-ref=origin/main
  • git diff --check

References

Refs #2994

Motivation:
JDK 25 nightly builds time out in repeated TlsGraphStageEdgeCasesSpec early-cancellation scenarios because earlier materializations can keep draining after the expected bytes have been collected.

Modification:
Materialize collectExactly with a KillSwitch and watch stream termination, then shut down and await the stream in finally after the expected bytes are collected.

Result:
Repeated TLS edge-case checks do not leave prior materializations running in the same actor system.

Tests:
- JDK 25 nightly-style virtualized stream-dispatcher flags: stream-tests / Test / testOnly org.apache.pekko.stream.io.TlsGraphStageEdgeCasesSpec
- scalafmt --mode diff-ref=origin/main --quiet
- scalafmt --list --mode diff-ref=origin/main
- git diff --check

References:
Refs apache#2994
Copy link
Copy Markdown
Member

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

lgtm

@He-Pin He-Pin merged commit fcc541a into apache:main May 28, 2026
9 checks passed
@He-Pin He-Pin deleted the fix/tls-edge-cleanup-after-early-cancel branch May 28, 2026 11:16
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