use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testAlternateSegmentRoute.
@Test
public void testAlternateSegmentRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/segment/food100").then().body(containsString("Segment: d100"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/segment/foo~Segment"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testNegationFutureRoute.
@Test
public void testNegationFutureRoute() throws InterruptedException {
given().baseUri("http://localhost:" + server.getPort()).when().get("/futurematch").then().body(containsString("FutureNegation"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Thread.sleep(5000);
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/futurematch~!nomatch"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testComplexRepeatRoute.
@Test
public void testComplexRepeatRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/repeat/52/53/complex").then().body(containsString("Repeat: 52,53"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/repeat/(IntNumber/).repeat()/complex"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testFuturePipeRoute.
@Test
public void testFuturePipeRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/futurepipe/i5").then().body(containsString("FuturePipe: 5"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().contains(getTransactionPrefix() + "/futurepipe/i~IntNumber"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testSegmentFutureRoute.
@Test
public void testSegmentFutureRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/segment/future/foobar").then().body(containsString("Segment Future: bar"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().contains(getTransactionPrefix() + "/segment/future/foo~Segment"));
}
Aggregations