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