Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <sheche@microsoft.com>
  • Loading branch information
jdneo committed Sep 2, 2024
1 parent e9ec0a9 commit 1288656
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public boolean applies(IProgressMonitor monitor) throws CoreException {
// If code goes here, it means that the project cannot be imported by gradle build server.
// The buildship should try to import it if it can. And the buildship importer should clean
// up the configurations of the gradle build server in the project description if it has.
if (!ProjectUtils.isGradleProject(project) && !project.hasNature(GRADLE_BUILD_SERVER_NATURE)) {
if (!ProjectUtils.isGradleProject(project) && !ProjectUtils.hasNature(project, GRADLE_BUILD_SERVER_NATURE)) {
String path = project.getLocation().toOSString();
gradleDetector.addExclusions(path.replace("\\", "\\\\"));
}
Expand Down Expand Up @@ -731,7 +731,7 @@ public static boolean isFailedStatus(IStatus status) {
private static void eliminateBuildServerFootprint(IProgressMonitor monitor) {
for (IProject project : ProjectUtils.getAllProjects()) {
try {
if (project.hasNature(GRADLE_BUILD_SERVER_NATURE)) {
if (ProjectUtils.hasNature(project, GRADLE_BUILD_SERVER_NATURE)) {
GradleUtils.removeConfigurationFromProjectDescription(
project,
new HashSet<>(Arrays.asList(GRADLE_BUILD_SERVER_NATURE)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ public void testGetGradleDistribution() {
@Test
public void testCleanUpBuildServerFootprint() throws Exception {
IProject project = importGradleProject("gradle-build-server");
assertFalse(project.hasNature(GradleProjectImporter.GRADLE_BUILD_SERVER_NATURE));
assertFalse(ProjectUtils.hasNature(project, GradleProjectImporter.GRADLE_BUILD_SERVER_NATURE));
for (ICommand command : project.getDescription().getBuildSpec()) {
if (Objects.equals(command.getBuilderName(), GradleProjectImporter.GRADLE_BUILD_SERVER_BUILDER_ID) ||
Objects.equals(command.getBuilderName(), GradleProjectImporter.JAVA_PROBLEM_CHECKER_ID)) {
Expand Down

0 comments on commit 1288656

Please sign in to comment.