Guard against null access on ClientCache.getCurrentServers() by initializing the 'DEFAULT' Pool.

This commit is contained in:
John Blum
2018-10-06 16:28:17 -07:00
parent 2077e9faf0
commit 8f6b7d6364

View File

@@ -2867,7 +2867,7 @@ public abstract class GemFireMockObjectsSupport extends MockObjectsSupport {
}).when(clientCacheFactorySpy).setPoolThreadLocalConnections(anyBoolean());
when(mockClientCache.getCurrentServers()).thenAnswer(invocation ->
Collections.unmodifiableSet(new HashSet<>(defaultPool.get().getServers())));
Collections.unmodifiableSet(new HashSet<>(mockClientCache.getDefaultPool().getServers())));
when(mockClientCache.getDefaultPool()).thenAnswer(invocation -> {