Skip to content

Commit 2ab1c1e

Browse files
committed
Format code
1 parent 74db9b7 commit 2ab1c1e

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

sentry-samples/sentry-samples-log4j2/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ tasks.shadowJar {
5151
archiveClassifier.set("") // Remove the classifier so it replaces the regular JAR
5252
mergeServiceFiles()
5353
// Use Log4j2 cache transformer to properly handle plugin files
54-
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer())
54+
transform(
55+
com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer()
56+
)
5557
}
5658

5759
// Make the regular jar task depend on shadowJar

sentry-samples/sentry-samples-log4j2/src/test/kotlin/io/sentry/DummyTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ class DummyTest {
99
// only needed to have more than 0 tests and not fail the build
1010
assertTrue(true)
1111
}
12-
}
12+
}

sentry-samples/sentry-samples-log4j2/src/test/kotlin/io/sentry/systemtest/ConsoleApplicationSystemTest.kt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package io.sentry.systemtest.io.sentry.systemtest
22

33
import io.sentry.SentryLevel
44
import io.sentry.systemtest.util.TestHelper
5+
import java.util.concurrent.TimeUnit
56
import org.junit.Assert
67
import org.junit.Before
78
import org.junit.Test
8-
import java.util.concurrent.TimeUnit
99

1010
class ConsoleApplicationSystemTest {
1111
lateinit var testHelper: TestHelper
@@ -40,23 +40,28 @@ class ConsoleApplicationSystemTest {
4040
private fun verifyExpectedEvents() {
4141
// Verify we received the RuntimeException
4242
testHelper.ensureErrorReceived { event ->
43-
event.exceptions?.any { ex -> ex.type == "RuntimeException" && ex.value == "Invalid productId=445" } ==
44-
true &&
43+
event.exceptions?.any { ex ->
44+
ex.type == "RuntimeException" && ex.value == "Invalid productId=445"
45+
} == true &&
4546
event.message?.formatted == "Something went wrong" &&
4647
event.level?.name == "ERROR"
4748
}
4849

4950
testHelper.ensureErrorReceived { event ->
50-
event.breadcrumbs?.firstOrNull { it.message == "Hello Sentry!" && it.level == SentryLevel.DEBUG } != null
51+
event.breadcrumbs?.firstOrNull {
52+
it.message == "Hello Sentry!" && it.level == SentryLevel.DEBUG
53+
} != null
5154
}
5255

5356
testHelper.ensureErrorReceived { event ->
54-
event.breadcrumbs?.firstOrNull { it.message == "User has made a purchase of product: 445" && it.level == SentryLevel.INFO } != null
57+
event.breadcrumbs?.firstOrNull {
58+
it.message == "User has made a purchase of product: 445" && it.level == SentryLevel.INFO
59+
} != null
5560
}
5661

5762
testHelper.ensureLogsReceived { logs, _ ->
5863
testHelper.doesContainLogWithBody(logs, "User has made a purchase of product: 445") &&
5964
testHelper.doesContainLogWithBody(logs, "Something went wrong")
6065
}
6166
}
62-
}
67+
}

0 commit comments

Comments
 (0)