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

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

jinmeiliao commented on a change in pull request #1116: GEODE-2665: Add Gfsh 
command to delete async event queues
URL: https://github.com/apache/geode/pull/1116#discussion_r156786372
 
 

 ##########
 File path: 
geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyAsyncEventQueueCommandDUnitTest.java
 ##########
 @@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.management.internal.cli.commands;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.internal.cache.wan.MyAsyncEventListener;
+import org.apache.geode.management.internal.cli.json.GfJsonException;
+import org.apache.geode.test.dunit.rules.LocatorServerStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.rules.GfshCommandRule;
+
+@Category(DistributedTest.class)
+public class DestroyAsyncEventQueueCommandDUnitTest {
+
+  private static MemberVM locator, server1, server2, server3;
+
+  @Rule
+  public LocatorServerStartupRule lsRule = new LocatorServerStartupRule();
+
+  @Rule
+  public GfshCommandRule gfsh = new GfshCommandRule();
+
+  @Before
+  public void setUp() throws Exception {
+    locator = lsRule.startLocatorVM(0);
+    server1 = lsRule.startServerVM(1, "group1", locator.getPort());
+    server2 = lsRule.startServerVM(2, locator.getPort());
+    gfsh.connectAndVerify(locator);
+  }
+
+  @Test
+  public void destroyAeq_returnsSuccess() {
+    gfsh.executeAndAssertThat(
+        "create async-event-queue --id=queue1 --listener=" + 
MyAsyncEventListener.class.getName())
+        .statusIsSuccess();
+
 
 Review comment:
   It would be a good idea for this test to verify cluster config change as 
well using something like:
   
   locator.invoke(()->{
   // get the cluster config service and then get the config for "cluster", and 
then get the xml string and verify the config is in there.
   })

----------------------------------------------------------------
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:
us...@infra.apache.org


> Add gfsh command to destroy async-event-queue
> ---------------------------------------------
>
>                 Key: GEODE-2665
>                 URL: https://issues.apache.org/jira/browse/GEODE-2665
>             Project: Geode
>          Issue Type: Sub-task
>          Components: docs, gfsh
>            Reporter: Swapnil Bawaskar
>            Assignee: Kenneth Howe
>             Fix For: 1.4.0
>
>
> Currently, there is only an {{create async-event-queue}} command in gfsh, we 
> need the corresponding {{destroy async-event-queue}}



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

Reply via email to