You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the short-sleep test stabilization (#559), the remaining ~150 Thread.sleep occurrences across ~28 test files should be converted to deterministic synchronization patterns. These use 80-200ms+ sleeps and are less likely to flake, but still represent non-deterministic test behavior.
The SubCommandModeConsoleTest (25 occurrences) and ExecutionsTest (18 occurrences) are the largest files and may benefit from a helper method that wraps the latch/listener pattern.
Streaming pipe tests may need stream-completion signals rather than command-execution listeners.
Some sleeps may be intentional (e.g., testing timeout behavior) — review each individually.
Summary
Following the short-sleep test stabilization (#559), the remaining ~150
Thread.sleepoccurrences across ~28 test files should be converted to deterministic synchronization patterns. These use 80-200ms+ sleeps and are less likely to flake, but still represent non-deterministic test behavior.Proposed patterns
CommandExecutionListener+CountDownLatch(same as Replace Thread.sleep with CountDownLatch in tests with short sleeps (10-50ms) #559)CountDownLatch(N)for N commandsTestConnection.waitForOutputContaining()instead of sleep + assertFiles to convert
AeshCommandCompletionTest.javaAeshCommandOptionActivatorTest.javaAeshCommandResultHandlerTest.javaAeshCommandPipelineTest.javaAeshCommandConditionalOperatorTest.javaAeshCommandEndOperatorTest.javaAeshCommandOverrideRequiredTest.javaAeshConsoleTest.javaAeshConnectionClosedTest.javaAeshHelpCommandTest.javaAeshAliasTest.javaExecutionsTest.javaHyperlinkTest.javaOptionVisibilityTest.javaStreamingPipeTest.javaSubCommandModeConsoleTest.javaAeshCommandValidatorTest.javaCompletionConsoleTest.javaAeshRuntimeRunnerTest.javaAeshConsoleRunnerTest.javaAeshCommandActivatorTest.javaAeshCommandRequiredTest.javaCommandExecutionListenerTest.javaHelpDocFormatTest.javaMapCommandTest.javaPromptSupplierTest.javaShellFeaturesTest.javaDepends on
Notes
SubCommandModeConsoleTest(25 occurrences) andExecutionsTest(18 occurrences) are the largest files and may benefit from a helper method that wraps the latch/listener pattern.