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

Disabling the gradle wrapper doesn't work in some cases #1045

Merged
merged 1 commit into from
May 17, 2019

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented May 16, 2019

Fixes #1044

Signed-off-by: Snjezana Peco [email protected]

@snjeza snjeza requested review from gorkem and fbricon May 16, 2019 21:59
if (GradleProjectImporter.getGradleHomeFile() != null) {
assertTrue(distribution instanceof LocalGradleDistribution);
} else {
assertTrue(distribution == GradleProjectImporter.DEFAULT_DISTRIBUTION);
Copy link
Contributor

Choose a reason for hiding this comment

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

assertSame

@@ -106,7 +107,11 @@ public void testDisableGradleWrapper() throws Exception {
assertTrue(distribution instanceof WrapperGradleDistribution);
JavaLanguageServerPlugin.getPreferencesManager().getPreferences().setGradleWrapperEnabled(false);
distribution = GradleProjectImporter.getGradleDistribution(file.toPath());
assertTrue(distribution instanceof WrapperGradleDistribution);
if (GradleProjectImporter.getGradleHomeFile() != null) {
assertTrue(distribution instanceof LocalGradleDistribution);
Copy link
Contributor

Choose a reason for hiding this comment

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

assertEquals(LocalGradleDistribution.class, distribution.getClass())

@@ -106,7 +107,11 @@ public void testDisableGradleWrapper() throws Exception {
assertTrue(distribution instanceof WrapperGradleDistribution);
Copy link
Contributor

@fbricon fbricon May 17, 2019

Choose a reason for hiding this comment

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

assertEquals(WrapperGradleDistribution.class, distribution.class);

gives us more info in case of failed assertion

@snjeza
Copy link
Contributor Author

snjeza commented May 17, 2019

test this please

@fbricon fbricon merged commit be7e028 into eclipse-jdtls:master May 17, 2019
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.

Disabling the gradle wrapper doesn't work in some cases
2 participants