You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2020/12/21 14:12:12 UTC

[GitHub] [logging-log4j-kotlin] rocketraman commented on a change in pull request #14: Upgrade Kotlin to v1.4

rocketraman commented on a change in pull request #14:
URL: https://github.com/apache/logging-log4j-kotlin/pull/14#discussion_r546721176



##########
File path: log4j-api-kotlin/src/test/kotlin/org.apache.logging.log4j.kotlin/LoggerTest.kt
##########
@@ -173,7 +173,8 @@ class LoggerTest {
   fun `Run in trace with result`() {
     var count = 0
     val f = withLevelFixture(Level.INFO, true) {
-      it.runInTrace(entryMsg) {
+      @SuppressWarnings("unused")
+      val mustBeHere = it.runInTrace(entryMsg) {

Review comment:
       Hmm, you're right -- seems like a subtle change in behavior due to the new type inference.
   
   We might as well assert on the returned count:
   
   ```
       var returnedCount = 0
       val f = withLevelFixture(Level.INFO, true) {
         returnedCount = it.runInTrace(entryMsg) {
           ++count
         }
       }
       assertTrue { count == 1 }
       assertTrue { returnedCount == 1 }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org