33
44package com .microsoft .applicationinsights .smoketest ;
55
6- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_11 ;
7- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_11_OPENJ9 ;
8- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_17 ;
9- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_17_OPENJ9 ;
10- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_21 ;
11- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_21_OPENJ9 ;
12- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_8 ;
13- import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .JAVA_8_OPENJ9 ;
6+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_11 ;
7+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_11_OPENJ9 ;
8+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_17 ;
9+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_17_OPENJ9 ;
10+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_21 ;
11+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_21_OPENJ9 ;
12+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_8 ;
13+ import static com .microsoft .applicationinsights .smoketest .EnvironmentValue .TOMCAT_8_JAVA_8_OPENJ9 ;
1414import static org .assertj .core .api .Assertions .assertThat ;
1515import static org .assertj .core .data .MapEntry .entry ;
1616
@@ -44,7 +44,7 @@ void internalSpan() throws Exception {
4444
4545 MessageData md = (MessageData ) ((Data <?>) mdEnvelope .getData ()).getBaseData ();
4646
47- assertThat (telemetry .rd .getName ()).isEqualTo ("GET /internal-span" );
47+ assertThat (telemetry .rd .getName ()).isEqualTo ("GET /CustomInstrumentation/ internal-span" );
4848 assertThat (telemetry .rd .getResponseCode ()).isEqualTo ("200" );
4949 assertThat (telemetry .rd .getProperties ())
5050 .containsExactly (entry ("_MS.ProcessedByMetricExtractors" , "True" ));
@@ -62,18 +62,24 @@ void internalSpan() throws Exception {
6262 assertThat (md .getProperties ()).hasSize (3 );
6363
6464 SmokeTestExtension .assertParentChild (
65- telemetry .rd , telemetry .rdEnvelope , telemetry .rddEnvelope1 , "GET /internal-span" );
65+ telemetry .rd ,
66+ telemetry .rdEnvelope ,
67+ telemetry .rddEnvelope1 ,
68+ "GET /CustomInstrumentation/internal-span" );
6669
6770 SmokeTestExtension .assertParentChild (
68- telemetry .rdd1 , telemetry .rddEnvelope1 , mdEnvelope , "GET /internal-span" );
71+ telemetry .rdd1 ,
72+ telemetry .rddEnvelope1 ,
73+ mdEnvelope ,
74+ "GET /CustomInstrumentation/internal-span" );
6975 }
7076
7177 @ Test
7278 @ TargetUri ("/server-span" )
7379 void serverSpan () throws Exception {
7480 List <Envelope > rdList = testing .mockedIngestion .waitForItems ("RequestData" , 2 );
7581
76- Envelope rdEnvelope1 = getRequestEnvelope (rdList , "GET /server-span" );
82+ Envelope rdEnvelope1 = getRequestEnvelope (rdList , "GET /CustomInstrumentation/ server-span" );
7783 Envelope rdEnvelope2 = getRequestEnvelope (rdList , "TestController.run" );
7884
7985 String operationId = rdEnvelope2 .getTags ().get ("ai.operation.id" );
@@ -89,7 +95,7 @@ void serverSpan() throws Exception {
8995 RequestData rd2 = (RequestData ) ((Data <?>) rdEnvelope2 .getData ()).getBaseData ();
9096 MessageData md = (MessageData ) ((Data <?>) mdEnvelope .getData ()).getBaseData ();
9197
92- assertThat (rd1 .getName ()).isEqualTo ("GET /server-span" );
98+ assertThat (rd1 .getName ()).isEqualTo ("GET /CustomInstrumentation/ server-span" );
9399 assertThat (rd1 .getResponseCode ()).isEqualTo ("200" );
94100 assertThat (rd1 .getProperties ())
95101 .containsExactly (entry ("_MS.ProcessedByMetricExtractors" , "True" ));
@@ -120,27 +126,27 @@ private static Envelope getRequestEnvelope(List<Envelope> envelopes, String name
120126 throw new IllegalStateException ("Could not find request with name: " + name );
121127 }
122128
123- @ Environment (JAVA_8 )
124- static class Java8Test extends CustomInstrumentationTest {}
129+ @ Environment (TOMCAT_8_JAVA_8 )
130+ static class Tomcat8Java8Test extends CustomInstrumentationTest {}
125131
126- @ Environment (JAVA_8_OPENJ9 )
127- static class Java8OpenJ9Test extends CustomInstrumentationTest {}
132+ @ Environment (TOMCAT_8_JAVA_8_OPENJ9 )
133+ static class Tomcat8Java8OpenJ9Test extends CustomInstrumentationTest {}
128134
129- @ Environment (JAVA_11 )
130- static class Java11Test extends CustomInstrumentationTest {}
135+ @ Environment (TOMCAT_8_JAVA_11 )
136+ static class Tomcat8Java11Test extends CustomInstrumentationTest {}
131137
132- @ Environment (JAVA_11_OPENJ9 )
133- static class Java11OpenJ9Test extends CustomInstrumentationTest {}
138+ @ Environment (TOMCAT_8_JAVA_11_OPENJ9 )
139+ static class Tomcat8Java11OpenJ9Test extends CustomInstrumentationTest {}
134140
135- @ Environment (JAVA_17 )
136- static class Java17Test extends CustomInstrumentationTest {}
141+ @ Environment (TOMCAT_8_JAVA_17 )
142+ static class Tomcat8Java17Test extends CustomInstrumentationTest {}
137143
138- @ Environment (JAVA_17_OPENJ9 )
139- static class Java17OpenJ9Test extends CustomInstrumentationTest {}
144+ @ Environment (TOMCAT_8_JAVA_17_OPENJ9 )
145+ static class Tomcat8Java17OpenJ9Test extends CustomInstrumentationTest {}
140146
141- @ Environment (JAVA_21 )
142- static class Java21Test extends CustomInstrumentationTest {}
147+ @ Environment (TOMCAT_8_JAVA_21 )
148+ static class Tomcat8Java21Test extends CustomInstrumentationTest {}
143149
144- @ Environment (JAVA_21_OPENJ9 )
145- static class Java21OpenJ9Test extends CustomInstrumentationTest {}
150+ @ Environment (TOMCAT_8_JAVA_21_OPENJ9 )
151+ static class Tomcat8Java21OpenJ9Test extends CustomInstrumentationTest {}
146152}
0 commit comments