Skip to content

Commit

Permalink
Fix FlowShellTest
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Jan 30, 2025
1 parent 7c166c3 commit bd10bde
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class FlowShellTest : BaseTest() {
val rows = (1..10L)

shell.session.flowOn(Dispatchers.IO).collect { session ->
session.output.onEach { output.add(it) }.launchIn(this)
session.error.onEach { errors.add(it) }.launchIn(this)
val outputJob = session.output.onEach { output.add(it) }.launchIn(this)
val errorJob = session.error.onEach { errors.add(it) }.launchIn(this)
rows.forEach {
session.write("echo test $it")
session.write("echo error $it 1>&2")
Expand All @@ -54,6 +54,8 @@ class FlowShellTest : BaseTest() {
session.close()
session.isAlive() shouldBe false
session.waitFor() shouldBe FlowProcess.ExitCode.OK
outputJob.join()
errorJob.join()
}

output shouldBe rows.map { "test $it" }
Expand Down

0 comments on commit bd10bde

Please sign in to comment.