adding a test for isFinal
MODIFY
dd-trace/src/test/groovy/com/datadoghq/trace/integration/URLAsResourceNameTest.groovy
dd-trace/src/test/groovy/com/datadoghq/trace/integration/URLAsResourceNameTest.groovy
@@ -77,5 +77,26 @@ class URLAsResourceNameTest extends Specification {
output << ["/users/:id/list_repository/"]
+ }
+
+ def "skip others rules if the current is set as final"() {
+
+ setup:
+ def decorator = new URLAsResourceName()
+ def r1 = new URLAsResourceName.Config.Rule(/(\\/users\\/)([^\/]*)/, /$1:id1/)
+ decorator.setPatterns(Arrays.asList(r1, URLAsResourceName.RULE_DIGIT))
+
+ when:
+ r1.setFinal(true)
+ def norm = decorator.norm(input)
+
+ then:
+ norm == output
+
+ where:
+ input << ["/users/guillaume/list_repository/"]
+ output << ["/users/:id1/list_repository/"]
+
+
}
}

adding a test for isFinal