Skip to content

Commit 7555402

Browse files
committed
add another conditional wait to avoid tests influencing each others
1 parent 587c8ab commit 7555402

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/java/com/github/cameltooling/lsp/internal/diagnostic/AbstractDiagnosticTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ protected void testDiagnostic(String fileUnderTest, int expectedNumberOfError, S
5353
protected void testDiagnostic(File file, int expectedNumberOfError, String extension) throws FileNotFoundException {
5454
camelLanguageServer = initializeLanguageServer(new FileInputStream(file), extension);
5555

56+
createAwait().untilAsserted(() -> assertThat(lastPublishedDiagnostics).isNotNull());
57+
createAwait().untilAsserted(() -> assertThat(lastPublishedDiagnostics.getDiagnostics()).isEmpty());
58+
5659
DidSaveTextDocumentParams params = new DidSaveTextDocumentParams(new TextDocumentIdentifier(DUMMY_URI+extension));
5760
camelLanguageServer.getTextDocumentService().didSave(params);
5861

0 commit comments

Comments
 (0)