You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/07/10 21:30:40 UTC

[PR] test: make mapWithResource abrupt cleanup tests deterministic [pekko]

He-Pin opened a new pull request, #3319:
URL: https://github.com/apache/pekko/pull/3319

   ### Motivation
   
   The abrupt materializer termination tests used Source.single. Since mapWithResource runs on the blocking I/O dispatcher, its async boundary can let Source.single complete and close the resource before materializer shutdown. The test can therefore observe normal upstream completion instead of the abrupt termination path.
   
   ### Modification
   
   Use Source.maybe in both abrupt termination variants so the upstream remains open. After resource creation, assert that cleanup has not run before shutting down the materializer.
   
   ### Result
   
   The tests now isolate abrupt termination from normal upstream completion and retain directional assertions that cleanup runs after shutdown, including exactly-once closure for AutoCloseable resources.
   
   ### Verification
   
   - FlowMapWithResourceSpec passed on Scala 2.13 and Scala 3.
   - validatePullRequest passed with 3,392 tests and no failures or errors.
   - Header and code-style checks passed.
   
   ### References
   
   Fixes #3310


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] test: make mapWithResource abrupt cleanup tests deterministic [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #3319:
URL: https://github.com/apache/pekko/pull/3319


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org