use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class Spring530RouterFunTest method simplePath.
@Test
public void simplePath() {
webClient.get().uri("/").exchange().block().bodyToMono(String.class).block();
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(introspector.getTransactionNames().contains("OtherTransaction/Spring/ (GET)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class Spring530RouterFunTest method postRegex.
@Test
public void postRegex() {
final String responseBody = webClient.post().uri("/path/ToNowhere!!!!").contentType(MediaType.APPLICATION_JSON).bodyValue("{\"this\": \"isJSON\"}").retrieve().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 Spring530RouterFunTest method queryParam.
@Test
public void queryParam() {
final String responseBody = webClient.get().uri("/wat/wat/wat?bar=java").retrieve().bodyToMono(String.class).block();
assertEquals("query parameter request", responseBody);
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(introspector.getTransactionNames().contains("OtherTransaction/Spring/QueryParameter/bar (GET)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SpringRouterFunTest method headers.
@Test
public void headers() {
final String responseBody = webClient.get().uri("/some/other/path").header("SpecialHeader", "productive").exchange().block().bodyToMono(String.class).block();
assertEquals("Headers request", responseBody);
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains("OtherTransaction/Spring/Unknown Route (GET)"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SpringRouterFunTest method helloWorldPath.
@Test
public void helloWorldPath() {
webClient.get().uri("/helloWorld").exchange().block().bodyToMono(String.class).block();
final Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
assertTrue(introspector.getTransactionNames().contains("OtherTransaction/Spring/helloWorld (GET)"));
}
Aggregations