Sort spans in Netty41ClientSslTest
MODIFY
instrumentation/netty/netty-4.1/javaagent/src/test/groovy/Netty41ClientSslTest.groovy
instrumentation/netty/netty-4.1/javaagent/src/test/groovy/Netty41ClientSslTest.groovy
@@ -81,6 +81,8 @@ class Netty41ClientSslTest extends AgentInstrumentationSpecification {
assertTraces(1) {
trace(0, 4) {
+ def list = Arrays.asList("RESOLVE", "CONNECT", "SSL handshake")
+ spans.subList(1, 4).sort(Comparator.comparing { item -> list.indexOf(item.name) })
span(0) {
name "parent"
status ERROR
@@ -149,6 +151,8 @@ class Netty41ClientSslTest extends AgentInstrumentationSpecification {
then:
assertTraces(1) {
trace(0, 6) {
+ def list = Arrays.asList("RESOLVE", "CONNECT", "SSL handshake")
+ spans.subList(1, 4).sort(Comparator.comparing { item -> list.indexOf(item.name) })
span(0) {
name "parent"
}

Sort spans in Netty41ClientSslTest (#5433)