File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
vertx-core/src/test/java/io/vertx/tests/context Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2121import io .vertx .core .spi .context .storage .ContextLocal ;
2222import io .vertx .test .core .ContextLocalHelper ;
2323import io .vertx .test .core .VertxTestBase ;
24+ import io .vertx .test .fakemetrics .FakeMetricsFactory ;
2425import org .junit .Assume ;
2526import org .junit .Test ;
2627
@@ -1241,4 +1242,14 @@ public void testContextLocals() {
12411242 assertSame (contextLocal , locals .get (1 ));
12421243 assertSame (locals , ((VertxInternal ) vertx ).contextLocals ());
12431244 }
1245+
1246+ @ Test
1247+ public void testVirtualThreadContextHasPoolMetrics () {
1248+ Assume .assumeTrue (isVirtualThreadAvailable ());
1249+ Vertx vertxWithMetrics = Vertx .builder ()
1250+ .withMetrics (new FakeMetricsFactory ())
1251+ .build ();
1252+ ContextInternal context = ((VertxImpl ) vertxWithMetrics ).createVirtualThreadContext ();
1253+ assertNotNull (context .workerPool ().metrics ());
1254+ }
12441255}
You can’t perform that action at this time.
0 commit comments