Skip to content

Commit 17ad12a

Browse files
authored
Fix trigger probe and tests (#9828)
condition was wrongly evaluated
1 parent 008b7b2 commit 17ad12a

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/probe/TriggerProbe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private boolean evaluateCondition(CapturedContext capture) {
118118
}
119119
long start = System.nanoTime();
120120
try {
121-
return !probeCondition.execute(capture);
121+
return probeCondition.execute(capture);
122122
} catch (EvaluationException ex) {
123123
DebuggerAgent.getSink().getProbeStatusSink().addError(probeId, ex);
124124
return false;

dd-java-agent/agent-debugger/src/test/java/com/datadog/debugger/trigger/TriggerProbeTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import java.util.Collection;
3333
import java.util.List;
3434
import org.joor.Reflect;
35-
import org.junit.jupiter.api.AfterEach;
3635
import org.junit.jupiter.api.BeforeEach;
3736
import org.junit.jupiter.api.Test;
3837

@@ -57,11 +56,6 @@ public void before() {
5756
setFieldInConfig(Config.get(), "distributedDebuggerEnabled", true);
5857
}
5958

60-
@AfterEach
61-
public void after() {
62-
ProbeRateLimiter.resetAll();
63-
}
64-
6559
@Test
6660
public void conditions() throws IOException, URISyntaxException {
6761
final String className = "com.datadog.debugger.TriggerProbe02";

0 commit comments

Comments
 (0)