Skip to content

Commit da0448a

Browse files
committed
fix: test controller traceId 세팅 안되는 버그 수정
1 parent bab79f0 commit da0448a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/gitanimals/supports/deadletter/DeadLetterTestController.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package org.gitanimals.supports.deadletter
22

33
import org.gitanimals.core.TraceIdContextOrchestrator
44
import org.gitanimals.core.TraceIdContextRollback
5+
import org.gitanimals.core.filter.MDCFilter.Companion.TRACE_ID
56
import org.rooftop.netx.api.OrchestratorFactory
7+
import org.slf4j.MDC
68
import org.springframework.web.bind.annotation.GetMapping
79
import org.springframework.web.bind.annotation.RequestParam
810
import org.springframework.web.bind.annotation.RestController
@@ -34,7 +36,7 @@ class DeadLetterTestController(
3436
throw IllegalStateException("test dead-letter")
3537
})
3638

37-
val result = orchestrator.sagaSync(message, context = mapOf("hello" to "world"))
39+
val result = orchestrator.sagaSync(message, context = mapOf("hello" to "world", "traceId" to MDC.get(TRACE_ID)))
3840

3941
if (result.isSuccess.not()) {
4042
result.throwError()

0 commit comments

Comments
 (0)