Skip to content

Commit f969b47

Browse files
authored
Fix noisy test stack traces (#2182)
1 parent fae8cef commit f969b47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

agent/agent-tooling/src/test/java/com/microsoft/applicationinsights/agent/internal/localstorage/IntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void setup() throws Exception {
9292
.then(
9393
invocation ->
9494
Mono.just(
95-
new MockHttpResponse(invocation.getArgument(0, HttpRequest.class), 401)));
95+
new MockHttpResponse(invocation.getArgument(0, HttpRequest.class), 500)));
9696
}
9797
HttpPipelineBuilder pipelineBuilder = new HttpPipelineBuilder().httpClient(mockedClient);
9898
localFileCache = new LocalFileCache(tempFolder);

agent/agent-tooling/src/test/java/com/microsoft/applicationinsights/agent/internal/localstorage/LocalFileLoaderTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,15 @@ public void testDeleteFilePermanentlyOnFailure() throws Exception {
307307
LocalFileLoader localFileLoader = new LocalFileLoader(localFileCache, tempFolder, null);
308308
LocalFileWriter localFileWriter = new LocalFileWriter(localFileCache, tempFolder, null);
309309

310+
StatsbeatModule statsbeatModule = mock(StatsbeatModule.class);
311+
when(statsbeatModule.getNetworkStatsbeat()).thenReturn(mock(NetworkStatsbeat.class));
312+
310313
TelemetryChannel telemetryChannel =
311314
new TelemetryChannel(
312315
pipelineBuilder.build(),
313316
new URL("http://foo.bar"),
314317
localFileWriter,
315-
Mockito.mock(StatsbeatModule.class),
318+
statsbeatModule,
316319
false);
317320

318321
// persist 10 files to disk

0 commit comments

Comments
 (0)