Skip to content

Commit

Permalink
Fix Java LS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
snjeza committed Aug 31, 2023
1 parent 5f4bd3b commit 74dd1b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.WorkingCopyOwner;
import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
import org.eclipse.jdt.core.manipulation.CoreASTProvider;
import org.eclipse.jdt.ls.core.internal.DocumentAdapter;
import org.eclipse.jdt.ls.core.internal.JDTUtils;
import org.eclipse.jdt.ls.core.internal.JavaClientConnection.JavaLanguageClient;
Expand Down Expand Up @@ -296,6 +297,7 @@ public void cleanUp() throws Exception {
JavaLanguageServerPlugin.logException(e);
}
ResourcesPlugin.getWorkspace().save(true/*full save*/, null/*no progress*/);
CoreASTProvider.getInstance().disposeAST();
}

protected void assertIsJavaProject(IProject project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public void testGetJdkToLaunchDaemon() {
@Test
public void testGetMajorJavaVersion() {
File javaHome = GradleUtils.getJdkToLaunchDaemon("10");
assertTrue(javaHome.getAbsolutePath().contains("fakejdk" + File.separator + "10"));
assertTrue("javaHome=" + javaHome.getAbsolutePath(), javaHome.getAbsolutePath().contains("fakejdk" + File.separator + "10"));
}
}

0 comments on commit 74dd1b8

Please sign in to comment.