Skip to content

Commit fc4b1a3

Browse files
dougqhclaude
andcommitted
Parameterize removeTag test across all span kind values
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 91b6de7 commit fc4b1a3

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

dd-trace-core/src/test/groovy/datadog/trace/core/DDSpanContextTest.groovy

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@ class DDSpanContextTest extends DDCoreSpecification {
430430
def "setTag then removeTag clears span.kind"() {
431431
when:
432432
def span = tracer.buildSpan("test", "test").start()
433-
span.setTag(Tags.SPAN_KIND, Tags.SPAN_KIND_SERVER)
433+
span.setTag(Tags.SPAN_KIND, kindString)
434434

435435
then:
436-
span.getTag(Tags.SPAN_KIND) == Tags.SPAN_KIND_SERVER
436+
span.getTag(Tags.SPAN_KIND) == kindString
437437

438438
when:
439439
((DDSpan) span).context().removeTag(Tags.SPAN_KIND)
@@ -443,6 +443,16 @@ class DDSpanContextTest extends DDCoreSpecification {
443443

444444
cleanup:
445445
span.finish()
446+
447+
where:
448+
kindString << [
449+
Tags.SPAN_KIND_SERVER,
450+
Tags.SPAN_KIND_CLIENT,
451+
Tags.SPAN_KIND_PRODUCER,
452+
Tags.SPAN_KIND_CONSUMER,
453+
Tags.SPAN_KIND_INTERNAL,
454+
Tags.SPAN_KIND_BROKER,
455+
]
446456
}
447457

448458
def "setTag with custom span.kind falls back to tag map"() {

0 commit comments

Comments
 (0)