Skip to content

Commit 281d762

Browse files
committed
fix
1 parent 05c9a80 commit 281d762

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

smoke-tests/framework/src/main/java/com/microsoft/applicationinsights/smoketest/SmokeTestExtension.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff 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.");

0 commit comments

Comments
 (0)