Fix flaky spring rabbit test (#8631)
This commit is contained in:
parent
0840ed86a7
commit
0ea2d7b8d8
|
@ -91,7 +91,12 @@ class ContextPropagationTest extends AgentInstrumentationSpecification {
|
||||||
then:
|
then:
|
||||||
assertTraces(2) {
|
assertTraces(2) {
|
||||||
trace(0, 5) {
|
trace(0, 5) {
|
||||||
spans.subList(2, 4).sort {
|
spans.subList(2, 5).sort {
|
||||||
|
// sort "consumer" span after "testQueue process" spans
|
||||||
|
if (it.name == "consumer") {
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
// order "testQueue process" spans
|
||||||
def destination = it.attributes.get(SemanticAttributes.MESSAGING_DESTINATION_NAME)
|
def destination = it.attributes.get(SemanticAttributes.MESSAGING_DESTINATION_NAME)
|
||||||
return destination == "<default>" ? 0 : 1
|
return destination == "<default>" ? 0 : 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue