openvidu-server: remove KmsManager getter only used in test

pull/567/head
pabloFuente 2020-11-20 11:53:23 +01:00
parent 3b8d025f13
commit b1d57232cb
2 changed files with 4 additions and 6 deletions

View File

@ -295,7 +295,7 @@ public abstract class KmsManager {
kmsReconnectionLocks.get(kms.getId()).unlock();
}
}
}, () -> new Long(dynamicReconnectLoopSeconds(ITERATION.getAndIncrement()) * 1000));
}, () -> Long.valueOf(dynamicReconnectLoopSeconds(ITERATION.getAndIncrement()) * 1000));
kurentoReconnectTimer.updateTimer();
}
@ -353,10 +353,6 @@ public abstract class KmsManager {
public abstract List<Kms> initializeKurentoClients(List<KmsProperties> kmsProperties, boolean disconnectUponFailure)
throws Exception;
public LoadManager getLoadManager() {
return this.loadManager;
}
@PostConstruct
protected abstract void postConstructInitKurentoClients();

View File

@ -14,6 +14,7 @@ import org.kurento.client.KurentoClient;
import org.kurento.client.MediaPipeline;
import org.kurento.client.ServerManager;
import org.mockito.Mockito;
import org.powermock.reflect.Whitebox;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
@ -37,7 +38,8 @@ public class IntegrationTestConfiguration {
List<Kms> successfullyConnectedKmss = new ArrayList<>();
List<KmsProperties> kmsProperties = invocation.getArgument(0);
for (KmsProperties kmsProp : kmsProperties) {
Kms kms = new Kms(kmsProp, spy.getLoadManager());
Kms kms = new Kms(kmsProp, Whitebox.getInternalState(spy, "loadManager"),
Whitebox.getInternalState(spy, "quarantineKiller"));
KurentoClient kClient = mock(KurentoClient.class);
doAnswer(i -> {