mhansonp commented on code in PR #7442:
URL: https://github.com/apache/geode/pull/7442#discussion_r843046667
##########
geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/QueueManagerJUnitTest.java:
##########
@@ -294,6 +295,70 @@ public void
testAddToConnectionListCallsCloseConnectionOpWithKeepAliveTrue2() {
assertThat(connection.keepAlive).isTrue();
}
+ @Test
+ public void recoverPrimaryRegistersBeforeSendingReady() {
+ Set<ServerLocation> excludedServers = new HashSet<>();
+ excludedServers.add(new ServerLocation("localhost", 1));
+ excludedServers.add(new ServerLocation("localhost", 2));
+ excludedServers.add(new ServerLocation("localhost", 3));
+ factory.addConnection(0, 0, 1);
+ factory.addConnection(0, 0, 2);
+ factory.addConnection(0, 0, 3);
+
+ LocalRegion testRegion = mock(LocalRegion.class);
+
+ InternalPool pool = new RecoveryTestPool();
+ ServerRegionProxy serverRegionProxy = new ServerRegionProxy("region",
pool);
+
+ when(testRegion.getServerProxy()).thenReturn(serverRegionProxy);
+ RegionAttributes<Object, Object> regionAttributes =
mock(RegionAttributes.class);
+ when(testRegion.getAttributes()).thenReturn(regionAttributes);
+ when(regionAttributes.getDataPolicy()).thenReturn(DataPolicy.DEFAULT);
+
+ createRegisterInterestTracker(pool, testRegion);
+
+ manager = new QueueManagerImpl(pool, endpoints, source, factory, 2,
+ 20, logger, ClientProxyMembershipID.getNewProxyMembership(ds));
+ manager.start(background);
+ manager.setSendClientReadyInTestOnly();
+ manager.clearQueueConnections();
+ factory.addConnection(0, 0, 4);
+ manager.recoverPrimary(excludedServers);
+
+
assertThat(opList.get(0)).isInstanceOf(RegisterInterestListOp.RegisterInterestListOpImpl.class);
Review Comment:
I don't understand this comment. What new test? All of the files I touched
will be converted over when I am done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]