Skip to content

Commit 6a6b8bb

Browse files
committed
Fix up after merge with master
Fixed a few broken AppSec tests that were presumably added recently Fixed bug in TagMap.getDoubleOrDefault
1 parent 6c4b71a commit 6a6b8bb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/domain/TestImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import datadog.trace.civisibility.test.ExecutionResults;
4747
import java.lang.reflect.Method;
4848
import java.util.Collection;
49+
import java.util.concurrent.TimeUnit;
4950
import java.util.function.Consumer;
5051
import javax.annotation.Nonnull;
5152
import javax.annotation.Nullable;

dd-java-agent/appsec/src/test/groovy/com/datadog/appsec/gateway/GatewayBridgeSpecification.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ class GatewayBridgeSpecification extends DDSpecification {
11811181
def flow = requestEndedCB.apply(mockCtx, spanInfo)
11821182
then:
11831183
1 * mockAppSecCtx.transferCollectedEvents() >> []
1184-
1 * spanInfo.getTags() >> ['http.route': 'route']
1184+
1 * spanInfo.getTags() >> TagMap.fromMap(['http.route': 'route'])
11851185
1 * requestSampler.preSampleRequest(_) >> true
11861186
0 * traceSegment.setTagTop(Tags.ASM_KEEP, true)
11871187
0 * traceSegment.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM)
@@ -1199,7 +1199,7 @@ class GatewayBridgeSpecification extends DDSpecification {
11991199
def flow = requestEndedCB.apply(mockCtx, spanInfo)
12001200
then:
12011201
1 * mockAppSecCtx.transferCollectedEvents() >> []
1202-
1 * spanInfo.getTags() >> ['http.route': 'route']
1202+
1 * spanInfo.getTags() >> TagMap.fromMap(['http.route': 'route'])
12031203
1 * requestSampler.preSampleRequest(_) >> false
12041204
0 * traceSegment.setTagTop(Tags.ASM_KEEP, true)
12051205
0 * traceSegment.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM)
@@ -1218,7 +1218,7 @@ class GatewayBridgeSpecification extends DDSpecification {
12181218
def flow = requestEndedCB.apply(mockCtx, spanInfo)
12191219
then:
12201220
1 * mockAppSecCtx.transferCollectedEvents() >> []
1221-
1 * spanInfo.getTags() >> ['http.route': 'route']
1221+
1 * spanInfo.getTags() >> TagMap.fromMap(['http.route': 'route'])
12221222
1 * requestSampler.preSampleRequest(_) >> true
12231223
1 * traceSegment.setTagTop(Tags.ASM_KEEP, true)
12241224
1 * traceSegment.setTagTop(Tags.PROPAGATED_TRACE_SOURCE, ProductTraceSource.ASM)

dd-trace-core/src/main/java/datadog/trace/core/CoreTracer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,8 +1806,7 @@ private DDSpanContext buildSpanContext() {
18061806
tracer.disableSamplingMechanismValidation,
18071807
propagationTags,
18081808
tracer.profilingContextIntegration,
1809-
tracer.injectBaggageAsTags,
1810-
isRemote);
1809+
tracer.injectBaggageAsTags);
18111810

18121811
// By setting the tags on the context we apply decorators to any tags that have been set via
18131812
// the builder. This is the order that the tags were added previously, but maybe the `tags`

internal-api/src/main/java/datadog/trace/api/TagMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ public final double getDouble(String tag) {
12131213

12141214
public final double getDoubleOrDefault(String tag, double defaultValue) {
12151215
Entry entry = this.getEntry(tag);
1216-
return entry == null ? 0D : entry.doubleValue();
1216+
return entry == null ? defaultValue : entry.doubleValue();
12171217
}
12181218

12191219
@Override

0 commit comments

Comments
 (0)