Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ f74af0b3f4b0c8385127bd16e3443542db820421

# Scala Steward: Reformat with scalafmt 3.10.3
7853d5b1340c616c74cfacaa9eb3541f54c42817

# Scala Steward: Reformat with scalafmt 3.11.2
44a226ad72d863a6d38be1a204f06cf481590333
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.11.1
version = 3.11.2
maxColumn = 140
runner.dialect = scala3

Expand Down
38 changes: 20 additions & 18 deletions core/src/test/scala/ox/SupervisedTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,26 @@ class SupervisedTest extends AnyFlatSpec with Matchers:
it should "interrupt once any fork ends with an exception" in {
val trail = Trail()

val result = Try(supervised {
forkUser {
sleep(300.millis)
trail.add("a")
}.discard

forkUser {
sleep(200.millis)
throw new RuntimeException("x")
}.discard

forkUser {
sleep(100.millis)
trail.add("b")
}.discard

2
})
val result = Try(
supervised {
forkUser {
sleep(300.millis)
trail.add("a")
}.discard

forkUser {
sleep(200.millis)
throw new RuntimeException("x")
}.discard

forkUser {
sleep(100.millis)
trail.add("b")
}.discard

2
}
)

result should matchPattern { case Failure(e) if e.getMessage == "x" => }
trail.add("done")
Expand Down
Loading