Skip to content

Commit

Permalink
Stabilize tests on CI by removing unused connections
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed May 26, 2023
1 parent 719066a commit bf867dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void error(String msg, boolean fromAnalyzer) {

@Override
public void debug(String msg, boolean fromAnalyzer) {
System.out.println(msg);
}

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.sonarlint.eclipse.core.internal.SonarLintCorePlugin;

import static java.nio.file.FileVisitResult.CONTINUE;
import static java.nio.file.FileVisitResult.SKIP_SUBTREE;
Expand Down Expand Up @@ -192,6 +193,9 @@ final static public void prepareWorkspace() throws Exception {
workspace.setDescription(description);

cleanWorkspace();

// Clear all registered servers to prevent auto-binding or auto-sync to create unexpected logs
SonarLintCorePlugin.getServersManager().getServers().forEach(s -> SonarLintCorePlugin.getServersManager().removeServer(s));
}

@AfterClass
Expand Down

0 comments on commit bf867dd

Please sign in to comment.