use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SpringRouterFunTest method pathAccept.
@Test
public void pathAccept() {
final String response = webClient.get().uri("/path-to-greatness").accept(MediaType.TEXT_PLAIN).exchange().block().bodyToMono(String.class).block();
assertEquals("Path to greatness", response);
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(msg(introspector), introspector.getTransactionNames().contains("OtherTransaction/Spring/path-to-greatness (GET)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SpringRouterFunTest method contentType.
@Test
public void contentType() {
final int statusCode = webClient.post().uri("/uploadPDF").contentType(MediaType.APPLICATION_PDF).exchange().block().statusCode().value();
assertEquals(200, statusCode);
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(msg(introspector), introspector.getTransactionNames().contains("OtherTransaction/Spring/uploadPDF (POST)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SpringRouterFunTest method postRegex.
@Test
public void postRegex() {
final String responseBody = webClient.post().uri("/path/ToNowhere!!!!").contentType(MediaType.APPLICATION_JSON).syncBody("{\"this\": \"isJSON\"}").exchange().block().bodyToMono(String.class).block();
assertEquals("Got[where] = " + "ToNowhere!!!!", responseBody);
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(msg(introspector), introspector.getTransactionNames().contains("OtherTransaction/Spring/path/{where} (POST)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class Spring510RouterFunTest method resources.
@Test
public void resources() {
final String response = webClient.get().uri("files/numbers.txt").exchange().block().bodyToMono(String.class).block();
assertEquals("1\n2\n3\n4\n5\n6\n7\n8\n9\n10", response);
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(msg(introspector), introspector.getTransactionNames().contains("OtherTransaction/Spring/files/{*} (GET)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class Spring510RouterFunTest method nested.
@Test
public void nested() {
assertEquals(200, webClient.get().uri("/language/en-us/nested").exchange().block().statusCode().value());
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(msg(introspector), introspector.getTransactionNames().contains("OtherTransaction/Spring/language/{language}/nested (GET)"));
}
Aggregations