Commit df010e0
committed
test: make mapWithResource cleanup tests deterministic
Motivation:
The abrupt materializer termination tests used Source.single, which can complete across mapWithResource's async boundary and close the resource before shutdown.
Modification:
Keep the upstream open with Source.maybe and assert that the resource has not been closed before shutting down the materializer.
Result:
The tests now distinguish abrupt termination cleanup from normal upstream completion.
Tests:
- FlowMapWithResourceSpec on Scala 2.13 and Scala 3
- sbt +headerCheckAll
- sbt checkCodeStyle
- sbt validatePullRequest (3392 passed, 0 failed)
References:
Refs #33101 parent 15dcac1 commit df010e0
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
| |||
531 | 532 | | |
532 | 533 | | |
533 | 534 | | |
534 | | - | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| 539 | + | |
538 | 540 | | |
539 | 541 | | |
540 | 542 | | |
| |||
0 commit comments