Skip to content

Commit f3b8bf3

Browse files
committed
Make ShellTestIntegrationTests more reliable
- Temp workaround for letting tests pass - Relates #899
1 parent eacd6c3 commit f3b8bf3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-shell-test-autoconfigure/src/test/java/org/springframework/shell/test/autoconfigure/ShellTestIntegrationTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ void testNonInteractive() throws Exception {
9797
Condition<String> helpHelpCondition = new Condition<>(line -> line.contains("help - Display help about available commands"),
9898
"Help help has expected output");
9999

100+
Condition<String> emptyCondition = new Condition<>(line -> line.trim().length() == 0,
101+
"Have only whitespace");
102+
100103
NonInteractiveShellSession session = client.nonInterative("help").run();
101104

102105
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
@@ -106,6 +109,12 @@ void testNonInteractive() throws Exception {
106109
});
107110

108111
session.write(session.writeSequence().clearScreen().build());
112+
// TODO: gh899
113+
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
114+
List<String> lines = session.screen().lines();
115+
assertThat(lines).are(emptyCondition);
116+
});
117+
109118
NonInteractiveShellSession session2 = client.nonInterative("help", "help").run();
110119
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
111120
List<String> lines = session2.screen().lines();

0 commit comments

Comments
 (0)