Skip to content

Commit f33c370

Browse files
committed
adjust tests
1 parent a5be823 commit f33c370

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

internal-api/src/test/groovy/datadog/trace/relocate/api/IOLoggerTest.groovy

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package datadog.trace.relocate.api
22

3+
import static datadog.trace.api.telemetry.LogCollector.EXCLUDE_TELEMETRY
4+
35
import datadog.trace.test.util.DDSpecification
46
import org.slf4j.Logger
57

@@ -21,7 +23,7 @@ class IOLoggerTest extends DDSpecification {
2123
ioLogger.success("test {}", "message")
2224

2325
then:
24-
1 * log.debug("test {}", "message")
26+
1 * log.debug(EXCLUDE_TELEMETRY, "test {}", "message")
2527
}
2628

2729
def "Success - Info level"() {
@@ -46,7 +48,7 @@ class IOLoggerTest extends DDSpecification {
4648
ioLogger.error("test message")
4749

4850
then:
49-
1 * log.debug("test message")
51+
1 * log.debug(EXCLUDE_TELEMETRY, "test message")
5052
}
5153

5254
def "Error - Debug level - Response"() {
@@ -59,6 +61,7 @@ class IOLoggerTest extends DDSpecification {
5961

6062
then:
6163
1 * log.debug(
64+
EXCLUDE_TELEMETRY,
6265
_,
6366
"test message",
6467
404,
@@ -76,7 +79,7 @@ class IOLoggerTest extends DDSpecification {
7679
ioLogger.error("test message", exception)
7780

7881
then:
79-
1 * log.debug(
82+
1 * log.debug(EXCLUDE_TELEMETRY,
8083
"test message",
8184
exception
8285
)
@@ -104,6 +107,7 @@ class IOLoggerTest extends DDSpecification {
104107

105108
then:
106109
1 * rateLimitedLogger.warn(
110+
EXCLUDE_TELEMETRY,
107111
_,
108112
"test message",
109113
404,
@@ -121,6 +125,7 @@ class IOLoggerTest extends DDSpecification {
121125

122126
then:
123127
1 * rateLimitedLogger.warn(
128+
EXCLUDE_TELEMETRY,
124129
_,
125130
"test message",
126131
"java.lang.RuntimeException",
@@ -140,8 +145,8 @@ class IOLoggerTest extends DDSpecification {
140145

141146
then:
142147
1 * rateLimitedLogger.warn("test message") >> true
143-
1 * log.info("very successful")
144-
0 * log.info("very successful again")
148+
1 * log.info(EXCLUDE_TELEMETRY,"very successful")
149+
0 * log.info(EXCLUDE_TELEMETRY,"very successful again")
145150
}
146151

147152
def "Unlogged Error Then Success - Info level"() {

0 commit comments

Comments
 (0)