Skip to content

Commit

Permalink
Make sure we see unhandled errors in ZIO tests at least in the log
Browse files Browse the repository at this point in the history
  • Loading branch information
durban committed Dec 4, 2024
1 parent 7bb6fed commit 4c1742c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/jvm/src/test/scala/dev/tauri/choam/baseSpecZIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ abstract class BaseSpecZIO
"ZIO",
{ case x: zio.ZIO[_, _, _] =>
val tsk = x.asInstanceOf[zio.Task[_]]
val tskWithLogCfg = zio.ZIO.scopedWith { scope =>
zio.Runtime.setUnhandledErrorLogLevel(zio.LogLevel.Info).build(scope) *> tsk
}
zio.Unsafe.unsafe { implicit u =>
this.runtime.unsafe.runToFuture(tsk)
this.runtime.unsafe.runToFuture(tskWithLogCfg)
}
}
)
Expand Down

0 comments on commit 4c1742c

Please sign in to comment.