Skip to content

Commit 8ef7e86

Browse files
committed
Add smoke test for request.setSuccess()
1 parent 126ed26 commit 8ef7e86

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/smoke/testApps/LegacySdkWebInterop/src/main/java/com/microsoft/applicationinsights/smoketestapp/TestController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public String test() {
4343
requestTelemetry.getContext().getUser().setId("myuser");
4444
requestTelemetry.setName("myspanname");
4545
requestTelemetry.setSource("mysource");
46+
requestTelemetry.setSuccess(false);
4647
return "OK!";
4748
}
4849
}

test/smoke/testApps/LegacySdkWebInterop/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/LegacySdkWebInteropTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
package com.microsoft.applicationinsights.smoketest;
2323

2424
import static org.junit.Assert.assertEquals;
25-
import static org.junit.Assert.assertTrue;
25+
import static org.junit.Assert.assertFalse;
2626

2727
import org.junit.Test;
2828

@@ -41,6 +41,6 @@ public void doMostBasicTest() throws Exception {
4141
assertEquals("myvalue2", telemetry.rd.getProperties().get("myattr2"));
4242
assertEquals(2, telemetry.rd.getProperties().size());
4343

44-
assertTrue(telemetry.rd.getSuccess());
44+
assertFalse(telemetry.rd.getSuccess());
4545
}
4646
}

0 commit comments

Comments
 (0)