From 0a68ac9bcbe258ae4cd2f17288069a49bcd0fb5b Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 23 Oct 2023 11:49:28 +0200 Subject: [PATCH] Remove the pinned event example from the documentation --- docs/src/main/asciidoc/virtual-threads.adoc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/src/main/asciidoc/virtual-threads.adoc b/docs/src/main/asciidoc/virtual-threads.adoc index 93bbc15465d1e..12f931d4f8a2f 100644 --- a/docs/src/main/asciidoc/virtual-threads.adoc +++ b/docs/src/main/asciidoc/virtual-threads.adoc @@ -527,7 +527,10 @@ When it happens, the test fails. The `@ShouldNotPin` can also be used on methods directly. The _junit5-virtual-threads_ also provides a `@ShouldPin` annotation for cases where pinning is unavoidable. -The following snippet demonstrates the `@ShouldPin` annotation usage and the possibility to inject a `ThreadPinnedEvents` instance in your test to verify when the carrier thread was pinned manually. +The following snippet demonstrates the `@ShouldPin` annotation usage. + +// This is not possible because of a classloading issue - See https://github.com/quarkusio/quarkus/issues/36569 : +// and the possibility to inject a `ThreadPinnedEvents` instance in your test to verify when the carrier thread was pinned manually. [source, java] ---- @@ -548,14 +551,6 @@ public class LoomUnitExampleTest { codeUnderTest.pin(); } - @Test - public void testThatShouldNotPin(ThreadPinnedEvents events) { // Inject an object to check the pin events - Assertions.assertTrue(events.getEvents().isEmpty()); - codeUnderTest.pin(); - await().until(() -> events.getEvents().size() > 0); - Assertions.assertEquals(events.getEvents().size(), 1); - } - } ----