From 80f8de948d8fb2343683bb04ecf92f76b12519d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A5le=20Pedersen?= Date: Fri, 21 Aug 2026 13:44:55 +0200 Subject: [PATCH] Upgrade Quarkus 3.38.1 to 3.38.2 and reduce test sleep workarounds Quarkus 3.38.2 includes: - AeshStreamConnection extends AbstractConnection (EventDecoder buffers input when stdinHandler is null, preventing command loss) - Aesh upgraded to 3.16.8 (processManager null check fix #570) - aesh-readline upgraded to 3.16.4 (input buffering fix #233) Reduce Thread.sleep in test commands from 50ms to 10ms (per command) and remove the 200ms post-command sleep entirely. --- pom.xml | 2 +- .../io/hyperfoil/tools/h5m/cli/H5mTest.java | 17 +++++------------ .../tools/h5m/cli/NotificationTest.java | 1 - 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index cb1e06ca..31c10043 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ true quarkus-bom io.quarkus.platform - 3.38.1 + 3.38.2 true diff --git a/src/test/java/io/hyperfoil/tools/h5m/cli/H5mTest.java b/src/test/java/io/hyperfoil/tools/h5m/cli/H5mTest.java index b3daf595..cc4e4945 100644 --- a/src/test/java/io/hyperfoil/tools/h5m/cli/H5mTest.java +++ b/src/test/java/io/hyperfoil/tools/h5m/cli/H5mTest.java @@ -58,12 +58,11 @@ private static String toCommand(String[] args) { public static List run(AeshLauncher launcher, String[]... args) { List outputs = new ArrayList<>(); for (String[] arg : args) { - // Brief pause before each command to allow aesh's readline cycle - // to set up stdinHandler after processing the previous command. - // Without this, command bytes may arrive while stdinHandler is null - // (between readline cycles) and be silently dropped. - // See: https://github.com/aeshell/aesh-readline/issues/233 - try { Thread.sleep(50); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } + // Minimal pause to let the aesh readline cycle complete between commands. + // The EventDecoder in aesh 3.16.8 buffers input when stdinHandler is null + // (preventing data loss), but the command still needs the readline cycle + // to start before it can be processed. + try { Thread.sleep(10); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } String command = toCommand(arg); long start = System.currentTimeMillis(); String output = launcher.executeCommand(command, CMD_TIMEOUT); @@ -71,8 +70,6 @@ public static List run(AeshLauncher launcher, String[]... args) { System.out.printf("run (%dms): %s%n", elapsed, command); outputs.add(output); } - // Additional pause after the last command before Quarkus shuts down - try { Thread.sleep(200); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } return outputs; } @@ -88,10 +85,6 @@ public void setup(QuarkusMainLauncher launcher) { }); aeshLauncher = new AeshLauncherImpl(launcher); aeshLauncher.launch(); - // Brief pause after launch to allow aesh's readline to set up - // stdinHandler before the first command is sent. - // See: https://github.com/aeshell/aesh-readline/issues/233 - try { Thread.sleep(50); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } @AfterEach diff --git a/src/test/java/io/hyperfoil/tools/h5m/cli/NotificationTest.java b/src/test/java/io/hyperfoil/tools/h5m/cli/NotificationTest.java index ba89eb5c..5b3871e1 100644 --- a/src/test/java/io/hyperfoil/tools/h5m/cli/NotificationTest.java +++ b/src/test/java/io/hyperfoil/tools/h5m/cli/NotificationTest.java @@ -31,7 +31,6 @@ public void setup(QuarkusMainLauncher launcher) { }); aeshLauncher = new AeshLauncherImpl(launcher); aeshLauncher.launch(); - try { Thread.sleep(50); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } @AfterEach