private static void createEurekaServerConfig() { eurekaServerConfig = mock(EurekaServerConfig.class); // Cluster management related when(eurekaServerConfig.getPeerEurekaNodesUpdateIntervalMs()).thenReturn(1000); // Replication logic related when(eurekaServerConfig.shouldSyncWhenTimestampDiffers()).thenReturn(true); when(eurekaServerConfig.getMaxTimeForReplication()).thenReturn(1000); when(eurekaServerConfig.getMaxElementsInPeerReplicationPool()).thenReturn(10); when(eurekaServerConfig.getMinThreadsForPeerReplication()).thenReturn(1); when(eurekaServerConfig.getMaxThreadsForPeerReplication()).thenReturn(1); when(eurekaServerConfig.shouldBatchReplication()).thenReturn(true); // Peer node connectivity (used by JerseyReplicationClient) when(eurekaServerConfig.getPeerNodeTotalConnections()).thenReturn(1); when(eurekaServerConfig.getPeerNodeTotalConnectionsPerHost()).thenReturn(1); when(eurekaServerConfig.getPeerNodeConnectionIdleTimeoutSeconds()).thenReturn(1000); } }
.withMaxConnectionsPerHost(config.getPeerNodeTotalConnectionsPerHost()) .withMaxTotalConnections(config.getPeerNodeTotalConnections()) .withConnectionIdleTimeout(config.getPeerNodeConnectionIdleTimeoutSeconds());
.withMaxConnectionsPerHost(config.getPeerNodeTotalConnectionsPerHost()) .withMaxTotalConnections(config.getPeerNodeTotalConnections()) .withConnectionIdleTimeout(config.getPeerNodeConnectionIdleTimeoutSeconds());
.withMaxConnectionsPerHost(config.getPeerNodeTotalConnectionsPerHost()) .withMaxTotalConnections(config.getPeerNodeTotalConnections()) .withConnectionIdleTimeout(config.getPeerNodeConnectionIdleTimeoutSeconds());
.withMaxConnectionsPerHost(config.getPeerNodeTotalConnectionsPerHost()) .withMaxTotalConnections(config.getPeerNodeTotalConnections()) .withConnectionIdleTimeout(config.getPeerNodeConnectionIdleTimeoutSeconds());