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() {
263
263
sb .append (':' );
264
264
sb .append (appServerPort );
265
265
}
266
- if (!appContext .isEmpty ()) {
267
- sb .append ('/' );
268
- sb .append (appContext );
269
- }
266
+ sb .append (appContext );
270
267
return sb .toString ();
271
268
}
272
269
273
270
protected String getAppContext () {
274
271
if (currentImageAppFileName .endsWith (".jar" )) {
275
272
// spring boot jar
276
- return "" ;
273
+ return "/ " ;
277
274
} else {
278
- return currentImageAppFileName .replace (".war" , "" );
275
+ return "/" + currentImageAppFileName .replace (".war" , "" ) + "/" ;
279
276
}
280
277
}
281
278
282
279
private void clearOutAnyInitLogs () throws Exception {
283
280
if (!skipHealthCheck ) {
284
281
await ().until (mockedIngestion ::isReceivingLiveMetrics );
285
- String contextRootUrl = getBaseUrl () + "/" ;
282
+ String contextRootUrl = getBaseUrl ();
286
283
HttpHelper .getResponseCodeEnsuringSampled (contextRootUrl );
287
284
waitForHealthCheckTelemetry (contextRootUrl );
288
285
await ()
@@ -291,7 +288,7 @@ private void clearOutAnyInitLogs() throws Exception {
291
288
assertThat (
292
289
mockedIngestion
293
290
.getLiveMetrics ()
294
- .getRequestCount ("GET / " + getAppContext ()))
291
+ .getRequestCount ("GET " + getAppContext ()))
295
292
.isEqualTo (1 ));
296
293
297
294
System .out .println ("Clearing any RequestData from health check." );
You can’t perform that action at this time.
0 commit comments