File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
smoke-tests/framework/src/main/java/com/microsoft/applicationinsights/smoketest Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -263,26 +263,23 @@ protected String getBaseUrl() {
263263 sb .append (':' );
264264 sb .append (appServerPort );
265265 }
266- if (!appContext .isEmpty ()) {
267- sb .append ('/' );
268- sb .append (appContext );
269- }
266+ sb .append (appContext );
270267 return sb .toString ();
271268 }
272269
273270 protected String getAppContext () {
274271 if (currentImageAppFileName .endsWith (".jar" )) {
275272 // spring boot jar
276- return "" ;
273+ return "/ " ;
277274 } else {
278- return currentImageAppFileName .replace (".war" , "" );
275+ return "/" + currentImageAppFileName .replace (".war" , "" ) + "/" ;
279276 }
280277 }
281278
282279 private void clearOutAnyInitLogs () throws Exception {
283280 if (!skipHealthCheck ) {
284281 await ().until (mockedIngestion ::isReceivingLiveMetrics );
285- String contextRootUrl = getBaseUrl () + "/" ;
282+ String contextRootUrl = getBaseUrl ();
286283 HttpHelper .getResponseCodeEnsuringSampled (contextRootUrl );
287284 waitForHealthCheckTelemetry (contextRootUrl );
288285 await ()
@@ -291,7 +288,7 @@ private void clearOutAnyInitLogs() throws Exception {
291288 assertThat (
292289 mockedIngestion
293290 .getLiveMetrics ()
294- .getRequestCount ("GET / " + getAppContext ()))
291+ .getRequestCount ("GET " + getAppContext ()))
295292 .isEqualTo (1 ));
296293
297294 System .out .println ("Clearing any RequestData from health check." );
You can’t perform that action at this time.
0 commit comments