|  | 
| 13 | 13 | import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.QUERY_PARAM; | 
| 14 | 14 | import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.REDIRECT; | 
| 15 | 15 | import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.SUCCESS; | 
|  | 16 | +import static java.util.Collections.emptySet; | 
| 16 | 17 | 
 | 
| 17 |  | -import io.opentelemetry.api.common.AttributeKey; | 
| 18 | 18 | import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | 
| 19 | 19 | import io.opentelemetry.instrumentation.testing.junit.http.AbstractHttpServerTest; | 
| 20 | 20 | import io.opentelemetry.instrumentation.testing.junit.http.HttpServerInstrumentationExtension; | 
| 21 | 21 | import io.opentelemetry.instrumentation.testing.junit.http.HttpServerTestOptions; | 
| 22 | 22 | import io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint; | 
| 23 | 23 | import io.opentelemetry.sdk.testing.assertj.SpanDataAssert; | 
| 24 | 24 | import io.opentelemetry.sdk.trace.data.StatusData; | 
| 25 |  | -import io.opentelemetry.semconv.HttpAttributes; | 
| 26 |  | -import java.util.HashSet; | 
| 27 |  | -import java.util.Set; | 
| 28 | 25 | import org.junit.jupiter.api.extension.RegisterExtension; | 
| 29 | 26 | import play.Mode; | 
| 30 | 27 | import play.mvc.Controller; | 
| @@ -106,18 +103,7 @@ protected void stopServer(Server server) throws Exception { | 
| 106 | 103 |   @Override | 
| 107 | 104 |   protected void configure(HttpServerTestOptions options) { | 
| 108 | 105 |     options.setHasHandlerSpan(unused -> true); | 
| 109 |  | -    options.setTestHttpPipelining(false); | 
| 110 |  | -    options.setResponseCodeOnNonStandardHttpMethod(404); | 
| 111 |  | -    // server spans are ended inside of the controller spans | 
| 112 |  | -    options.setVerifyServerSpanEndTime(false); | 
| 113 |  | -    options.setHttpAttributes( | 
| 114 |  | -        serverEndpoint -> { | 
| 115 |  | -          Set<AttributeKey<?>> attributes = | 
| 116 |  | -              new HashSet<>(HttpServerTestOptions.DEFAULT_HTTP_ATTRIBUTES); | 
| 117 |  | -          attributes.remove(HttpAttributes.HTTP_ROUTE); | 
| 118 |  | -          return attributes; | 
| 119 |  | -        }); | 
| 120 |  | - | 
|  | 106 | +    options.setHttpAttributes(endpoint -> emptySet()); | 
| 121 | 107 |     options.setExpectedException(new IllegalArgumentException(EXCEPTION.getBody())); | 
| 122 | 108 |     options.disableTestNonStandardHttpMethod(); | 
| 123 | 109 |   } | 
|  | 
0 commit comments