Skip to content

Commit 4ed9cb2

Browse files
committed
[test] Deregister the metrics repository as soon as possible
Signed-off-by: Violeta Georgieva <696661+violetagg@users.noreply.github.com>
1 parent ab67d7f commit 4ed9cb2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reactor-netty-http/src/test/java/reactor/netty/http/HttpMetricsHandlerTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ void tearDown() throws InterruptedException, ExecutionException, TimeoutExceptio
228228
.block(Duration.ofSeconds(30));
229229
}
230230

231+
Metrics.removeRegistry(registry);
232+
registry.clear();
233+
registry.close();
234+
231235
// In case the ServerCloseHandler is registered on the server, make sure client socket is closed on the server side
232236
assertThat(ServerCloseHandler.INSTANCE.awaitClientClosedOnServer()).as("awaitClientClosedOnServer timeout").isTrue();
233237

@@ -240,10 +244,6 @@ void tearDown() throws InterruptedException, ExecutionException, TimeoutExceptio
240244
group.close()
241245
.get(5, TimeUnit.SECONDS);
242246
}
243-
244-
Metrics.removeRegistry(registry);
245-
registry.clear();
246-
registry.close();
247247
}
248248

249249
@ParameterizedTest

0 commit comments

Comments
 (0)