Skip to content

Commit

Permalink
Do not fail test clean up if console is not empty after clearing it
Browse files Browse the repository at this point in the history
RedDeer's method was a bit too aggressive on that, there might be some background process adding traces after clearing, leading to failure
  • Loading branch information
damien-urruty-sonarsource committed Apr 15, 2022
1 parent 194aeaf commit cc8b391
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public final void cleanup() {

SonarLintConsole consoleView = new SonarLintConsole();
System.out.println(consoleView.getConsoleView().getConsoleText());
consoleView.getConsoleView().clearConsole();
consoleView.clear();

new CleanWorkspaceRequirement().fulfill();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public ConsoleView getConsoleView() {
return consoleView;
}

public void clear() {
consoleView.activate();
new DefaultToolItem(consoleView.getCTabItem().getFolder(), "Clear Console").click();
}

@SuppressWarnings("unchecked")
private void openConsole(Matcher<String> textMatcher) {
consoleView.open();
Expand Down

0 comments on commit cc8b391

Please sign in to comment.