aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-main/src/test/java/org/sonar/application/TestAppState.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-main/src/test/java/org/sonar/application/TestAppState.java')
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/TestAppState.java20
1 files changed, 1 insertions, 19 deletions
diff --git a/server/sonar-main/src/test/java/org/sonar/application/TestAppState.java b/server/sonar-main/src/test/java/org/sonar/application/TestAppState.java
index 125ae867d40..27f6c4d5fb0 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/TestAppState.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/TestAppState.java
@@ -19,7 +19,6 @@
*/
package org.sonar.application;
-import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
@@ -28,25 +27,14 @@ import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Nonnull;
import org.sonar.NetworkUtils;
-import org.sonar.application.cluster.ClusterAppState;
-import org.sonar.cluster.localclient.HazelcastClient;
import org.sonar.process.ProcessId;
-public class TestAppState implements ClusterAppState {
+public class TestAppState implements AppState {
private final Map<ProcessId, Boolean> localProcesses = new EnumMap<>(ProcessId.class);
private final Map<ProcessId, Boolean> remoteProcesses = new EnumMap<>(ProcessId.class);
private final List<AppStateListener> listeners = new ArrayList<>();
private final AtomicBoolean webLeaderLocked = new AtomicBoolean(false);
- private final HazelcastClient hazelcastClient;
-
- public TestAppState() {
- this(null);
- }
-
- public TestAppState(HazelcastClient hazelcastClient) {
- this.hazelcastClient = hazelcastClient;
- }
@Override
public void addListener(@Nonnull AppStateListener listener) {
@@ -100,12 +88,6 @@ public class TestAppState implements ClusterAppState {
}
@Override
- public HazelcastClient getHazelcastClient() {
- Preconditions.checkState(hazelcastClient != null, "An HazelcastClient should be provided when testing in cluster mode");
- return hazelcastClient;
- }
-
- @Override
public void close() {
// nothing to do
}