Skip to content

Commit e30d4ae

Browse files
committed
Fix failing test
1 parent fac3455 commit e30d4ae

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ protected ErrorCaptureImpl getFirstError() {
452452
}
453453

454454
static TransactionImpl checkTransaction(TransactionImpl transaction, String expectedName, String expectedMethod, int expectedStatus) {
455+
return checkTransaction(transaction, expectedName, expectedMethod, expectedStatus, "5.3.30");
456+
}
457+
458+
static TransactionImpl checkTransaction(TransactionImpl transaction, String expectedName, String expectedMethod, int expectedStatus, String expectedFrameworkVersion) {
455459
assertThat(transaction.getType()).isEqualTo("request");
456460
assertThat(transaction.getNameAsString()).isEqualTo(expectedName);
457461

@@ -468,7 +472,7 @@ static TransactionImpl checkTransaction(TransactionImpl transaction, String expe
468472
.isEqualTo("Spring Webflux");
469473

470474
assertThat(transaction.getFrameworkVersion())
471-
.isEqualTo("5.3.30");
475+
.isEqualTo(expectedFrameworkVersion);
472476

473477
return transaction;
474478
}

apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServletContainerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void shouldOnlyCreateOneTransaction() throws InterruptedException {
7474
TransactionImpl transaction = reporter.getFirstTransaction(200);
7575

7676
// transaction naming should be set by webflux instrumentation
77-
AbstractServerInstrumentationTest.checkTransaction(transaction, "GET /functional/with-parameters/{id}", "GET", 200);
77+
AbstractServerInstrumentationTest.checkTransaction(transaction, "GET /functional/with-parameters/{id}", "GET", 200, "6.2.0");
7878

7979
// transaction HTTP part should be provided by servlet instrumentation
8080
AbstractServerInstrumentationTest.checkUrl(client, transaction, "/with-parameters/42");

0 commit comments

Comments
 (0)