Skip to content

Commit

Permalink
Fix warnings in test
Browse files Browse the repository at this point in the history
  • Loading branch information
morgen-peschke committed May 31, 2024
1 parent c472303 commit ccb0e27
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ import cats.effect.IO
import cats.syntax.all.*
import org.typelevel.log4cats.SelfAwareStructuredLogger
import org.typelevel.log4cats.testing.TestingLoggerFactory
import org.typelevel.log4cats.testing.TestingLoggerFactory.{
Debug,
Error,
Info,
LogMessage,
Trace,
Warn
}
import org.typelevel.log4cats.testing.TestingLoggerFactory.{Debug, Error, Info, LogMessage, Trace, Warn}

import scala.annotation.nowarn

@nowarn("msg=dead code following this construct")
class DeferredLoggerFactoryTest extends munit.CatsEffectSuite {
test(
"DeferredLoggerFactory should not log messages by default when code completes without raising an error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import cats.effect.IO
import cats.syntax.all.*
import org.typelevel.log4cats.testing.TestingLogger

import scala.annotation.nowarn

@nowarn("msg=dead code following this construct")
class DeferredLoggerTest extends munit.CatsEffectSuite {
test(
"DeferredLogger should not log messages by default when code completes without raising an error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import cats.effect.IO
import cats.syntax.all.*
import org.typelevel.log4cats.testing.StructuredTestingLogger

import scala.annotation.nowarn

@nowarn("msg=dead code following this construct")
class DeferredStructuredLoggerTest extends munit.CatsEffectSuite {
test(
"DeferredStructuredLogger should not log messages by default when code completes without raising an error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class LogMessageTest extends munit.CatsEffectSuite {

IO.delay(LogMessage(LogLevel.Info, haltAndCatchFire, none, Map.empty))
.attemptTap { result =>
IO.delay(assert(result.isRight), clue("Should be ok here, the lazy exception shouldn't be triggered yet"))
IO.delay(assert(result.isRight, clue("Should be ok here, the lazy exception shouldn't be triggered yet")))
}
.flatTap { lm =>
IO.delay(lm.lazyMessage()).intercept[HaltAndCatchFire]
Expand Down

0 comments on commit ccb0e27

Please sign in to comment.