Skip to content

Commit

Permalink
add another conditional wait to avoid tests influencing each others
Browse files Browse the repository at this point in the history
  • Loading branch information
apupier committed Jun 7, 2023
1 parent a9faacb commit 287bc76
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ protected void testDiagnostic(String fileUnderTest, int expectedNumberOfError, S
protected void testDiagnostic(File file, int expectedNumberOfError, String extension) throws FileNotFoundException {
camelLanguageServer = initializeLanguageServer(new FileInputStream(file), extension);

createAwait().untilAsserted(() -> assertThat(lastPublishedDiagnostics).isNotNull());
createAwait().untilAsserted(() -> assertThat(lastPublishedDiagnostics.getDiagnostics()).isEmpty());

DidSaveTextDocumentParams params = new DidSaveTextDocumentParams(new TextDocumentIdentifier(DUMMY_URI+extension));
camelLanguageServer.getTextDocumentService().didSave(params);

Expand Down

0 comments on commit 287bc76

Please sign in to comment.