Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure project and pom.xml diagnostics are properly reset #818

Merged
merged 1 commit into from
Oct 2, 2018

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Oct 2, 2018

Fixes #814

Copy link
Contributor

@snjeza snjeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fbricon WorkspaceDiagnosticsHandlerTest.testMissingNatures() fails

diff --git a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/handlers/WorkspaceDiagnosticsHandlerTest.java b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/handlers/WorkspaceDiagnosticsHandlerTest.java
index 741025d8..9d2d68e9 100644
--- a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/handlers/WorkspaceDiagnosticsHandlerTest.java
+++ b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/handlers/WorkspaceDiagnosticsHandlerTest.java
@@ -11,7 +11,6 @@
 package org.eclipse.jdt.ls.core.internal.handlers;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.mock;
@@ -251,7 +250,7 @@ public class WorkspaceDiagnosticsHandlerTest extends AbstractProjectsManagerBase
                Collections.reverse(allCalls);
                projectsManager.setConnection(client);
                Optional<PublishDiagnosticsParams> projectDiags = allCalls.stream().filter(p -> p.getUri().endsWith("eclipse/wtpproject")).findFirst();
-               assertFalse(projectDiags.isPresent());
+               assertTrue(projectDiags.get().getDiagnostics().isEmpty());
        }
 
        @Test

@fbricon fbricon changed the title WIP - Ensure project and pom.xml diagnostics are properly reset Ensure project and pom.xml diagnostics are properly reset Oct 2, 2018
@fbricon
Copy link
Contributor Author

fbricon commented Oct 2, 2018

test this please

@fbricon
Copy link
Contributor Author

fbricon commented Oct 2, 2018

@snjeza added tests

@snjeza snjeza merged commit 7fb2510 into eclipse-jdtls:master Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants