This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch maintenance-branch
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 6469afd148fb8c3ebfd7ad06ac74f598ad541de2
Author: andi-huber <[email protected]>
AuthorDate: Wed Mar 4 16:48:28 2026 +0100

    CAUSEWAY-3972: simplifies test; comments
---
 .../apache/causeway/commons/internal/base/_OneshotTest.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/commons/src/test/java/org/apache/causeway/commons/internal/base/_OneshotTest.java
 
b/commons/src/test/java/org/apache/causeway/commons/internal/base/_OneshotTest.java
index 12ecfa93522..a5ef79e95d3 100644
--- 
a/commons/src/test/java/org/apache/causeway/commons/internal/base/_OneshotTest.java
+++ 
b/commons/src/test/java/org/apache/causeway/commons/internal/base/_OneshotTest.java
@@ -28,12 +28,12 @@
 
 class _OneshotTest {
 
-    final _Oneshot a = new _Oneshot();
+    final _Oneshot oneshot = new _Oneshot();
     final LongAdder counter = new LongAdder();
 
     @Test
     void test() {
-        a.trigger(this::sayHelloOnce);
+        oneshot.trigger(this::sayHelloOnce);
     }
 
     @SneakyThrows
@@ -44,13 +44,11 @@ void sayHelloOnce() {
 
         counter.increment();
 
-        var thread = new Thread(this::doMoreWork);
+        // calling 'sayHelloOnce' from a different thread, while still 
executing in the main thread,
+        // must not lead to a recursions
+        var thread = new Thread(this::sayHelloOnce);
         thread.start();
         thread.join();
     }
 
-    void doMoreWork() {
-        a.trigger(this::sayHelloOnce);
-    }
-
 }

Reply via email to