geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3338) Refactor CreateAndDestroyGatewaySenderCommandsDUnitTest.java to use test rules
Date Tue, 31 Oct 2017 18:34:00 GMT

    [ https://issues.apache.org/jira/browse/GEODE-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16227289#comment-16227289
] 

ASF GitHub Bot commented on GEODE-3338:
---------------------------------------

ladyVader commented on a change in pull request #995: GEODE-3338 Refactor WAN command tests
to use new Rules
URL: https://github.com/apache/geode/pull/995#discussion_r148087294
 
 

 ##########
 File path: geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
 ##########
 @@ -230,41 +251,39 @@ public void testListGatewaySenderGatewayReceiver() throws GfJsonException
{
   }
 
   @Test
-  public void testListGatewaySenderGatewayReceiver_group() {
-
-    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+  public void testListGatewaySenderGatewayReceiver_group() throws Exception {
 
-    Properties props = getDistributedSystemProperties();
-    props.setProperty(MCAST_PORT, "0");
-    props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
-    props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
-    setUpJmxManagerOnVm0ThenConnect(props);
+    Integer lnPort = locatorSite1.getPort();
+    Integer nyPort = locatorSite2.getPort();
 
-    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    // setup servers in Site #1 (London)
+    server1 = startServerWithGroups(3, "Serial_Sender, Parallel_Sender", lnPort);
+    server2 = startServerWithGroups(4, "Serial_Sender, Parallel_Sender", lnPort);
+    server3 = startServerWithGroups(5, "Parallel_Sender, Receiver_Group", lnPort);
 
-    vm6.invoke(() -> createAndStartReceiver(nyPort));
+    // server in Site 2 (New York)
+    server4 = locatorServerStartupRule.startServerVM(6, nyPort);
+    server5 = locatorServerStartupRule.startServerVM(7, nyPort);
 
-    vm3.invoke(() -> createCacheWithGroups(lnPort, "Serial_Sender, Parallel_Sender"));
-    vm3.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null,
false));
-    vm3.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false, null,
false));
+    server4.invoke(() -> createAndStartReceiver(nyPort));
 
-    vm4.invoke(() -> createCacheWithGroups(lnPort, "Serial_Sender, Parallel_Sender"));
-    vm4.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false, null,
false));
-    vm4.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null,
false));
+    server1.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null,
false));
+    server1.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false,
null, false));
 
-    vm5.invoke(() -> createAndStartReceiverWithGroup(lnPort, "Parallel_Sender,Receiver_Group"));
-    vm5.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false, null,
false));
+    server2.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false,
null, false));
+    server2.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null,
false));
 
+    server3.invoke(() -> createAndStartReceiver(lnPort));
+    server3.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false,
null, false));
 
-    vm7.invoke(() -> createCache(nyPort));
-    vm7.invoke(() -> createSender("ln_Serial", 1, false, 100, 400, false, false, null,
false));
-    vm7.invoke(() -> createSender("ln_Parallel", 1, true, 100, 400, false, false, null,
false));
+    server5.invoke(() -> createSender("ln_Serial", 1, false, 100, 400, false, false, null,
false));
+    server5.invoke(() -> createSender("ln_Parallel", 1, true, 100, 400, false, false,
null, false));
 
     pause(10000);
     String command = CliStrings.LIST_GATEWAY + " --" + CliStrings.GROUP + "=Serial_Sender";
-    CommandResult cmdResult = executeCommand(command);
+    CommandResult cmdResult = gfsh.executeCommand(command);
 
 Review comment:
   I think the premise of these JIRAs is to move to the new test rules.  I can look into modifying
the command execution and status checks (for the changes Jared committed on Friday), but it
seems outside the bounds of the original JIRA.  Will discuss with Dan.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Refactor CreateAndDestroyGatewaySenderCommandsDUnitTest.java to use test rules
> ------------------------------------------------------------------------------
>
>                 Key: GEODE-3338
>                 URL: https://issues.apache.org/jira/browse/GEODE-3338
>             Project: Geode
>          Issue Type: Sub-task
>          Components: tests
>            Reporter: Patrick Rhomberg
>
> {{CreateAndDestroyGatewaySenderCommandsDUnitTest}} is using {{CliCommandTestBase}}, which
is a deprecated class. It should be refactored to use more current test rules.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message