-
Notifications
You must be signed in to change notification settings - Fork 408
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
Conversation
if (GradleProjectImporter.getGradleHomeFile() != null) { | ||
assertTrue(distribution instanceof LocalGradleDistribution); | ||
} else { | ||
assertTrue(distribution == GradleProjectImporter.DEFAULT_DISTRIBUTION); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
Signed-off-by: Snjezana Peco <[email protected]>
test this please |
Fixes #1044
Signed-off-by: Snjezana Peco [email protected]