From 289a5a2a73a320dba2081d19f88ea23c5a405d15 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 4 Apr 2019 15:08:32 +0200 Subject: SONAR-11752 remove SonarCloud-specific code --- .../java/org/sonar/server/notification/ws/DispatchersImpl.java | 6 +----- .../org/sonar/server/notification/ws/DispatchersImplTest.java | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'server') diff --git a/server/sonar-server/src/main/java/org/sonar/server/notification/ws/DispatchersImpl.java b/server/sonar-server/src/main/java/org/sonar/server/notification/ws/DispatchersImpl.java index 4b557e8c96b..67d9ab9a7fe 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/notification/ws/DispatchersImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/notification/ws/DispatchersImpl.java @@ -26,8 +26,6 @@ import java.util.function.Predicate; import org.sonar.api.Startable; import org.sonar.api.config.Configuration; import org.sonar.process.ProcessProperties; -import org.sonar.server.issue.notification.DoNotFixNotificationHandler; -import org.sonar.server.issue.notification.NewIssuesNotificationHandler; import org.sonar.server.notification.NotificationCenter; import org.sonar.server.qualitygate.notification.QGChangeNotificationHandler; @@ -38,9 +36,7 @@ import static org.sonar.server.notification.NotificationDispatcherMetadata.PER_P public class DispatchersImpl implements Dispatchers, Startable { private static final Set GLOBAL_DISPATCHERS_TO_IGNORE_ON_SONAR_CLOUD = ImmutableSet.of( - QGChangeNotificationHandler.KEY, - DoNotFixNotificationHandler.KEY, - NewIssuesNotificationHandler.KEY); + QGChangeNotificationHandler.KEY); private final NotificationCenter notificationCenter; private final Configuration configuration; diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java index 1fcd38247fb..cc46c9db775 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java @@ -41,12 +41,12 @@ public class DispatchersImplTest { .setProperty(GLOBAL_NOTIFICATION, "true") .setProperty(PER_PROJECT_NOTIFICATION, "true"), NotificationDispatcherMetadata.create(NewIssuesNotificationHandler.KEY) - .setProperty(GLOBAL_NOTIFICATION, "true"), + .setProperty(GLOBAL_NOTIFICATION, "false"), NotificationDispatcherMetadata.create(QGChangeNotificationHandler.KEY) .setProperty(GLOBAL_NOTIFICATION, "true") .setProperty(PER_PROJECT_NOTIFICATION, "true"), NotificationDispatcherMetadata.create(DoNotFixNotificationHandler.KEY) - .setProperty(GLOBAL_NOTIFICATION, "true") + .setProperty(GLOBAL_NOTIFICATION, "false") .setProperty(PER_PROJECT_NOTIFICATION, "true") }, new NotificationChannel[] {}); @@ -60,11 +60,11 @@ public class DispatchersImplTest { underTest.start(); assertThat(underTest.getGlobalDispatchers()).containsExactly( - QGChangeNotificationHandler.KEY, DoNotFixNotificationHandler.KEY, NewIssuesNotificationHandler.KEY, MyNewIssuesNotificationHandler.KEY); + QGChangeNotificationHandler.KEY, MyNewIssuesNotificationHandler.KEY); } @Test - public void get_global_dispatchers_on_sonar_cloud() { + public void get_global_dispatchers_on_sonarcloud() { settings.setProperty("sonar.sonarcloud.enabled", "true"); underTest.start(); @@ -81,7 +81,7 @@ public class DispatchersImplTest { } @Test - public void get_project_dispatchers_on_sonar_cloud() { + public void get_project_dispatchers_on_sonarcloud() { settings.setProperty("sonar.sonarcloud.enabled", "true"); underTest.start(); -- cgit v1.2.3