You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2022/05/18 02:52:44 UTC

[GitHub] [incubator-pegasus] GehaFearless opened a new pull request, #973: feature: add a app drop interface to the java client

GehaFearless opened a new pull request, #973:
URL: https://github.com/apache/incubator-pegasus/pull/973

   ### What problem does this PR solve? <!--add issue link with summary if exists-->
   As https://github.com/apache/incubator-pegasus/issues/972,I add dropApp interface to the java client.


-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org


[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #973: feat: add app drop interface to the java client

Posted by GitBox <gi...@apache.org>.
acelyc111 commented on code in PR #973:
URL: https://github.com/apache/incubator-pegasus/pull/973#discussion_r879296687


##########
java-client/src/test/java/org/apache/pegasus/client/TestAdminClient.java:
##########
@@ -88,11 +94,36 @@ public void testIsAppHealthyIfTableNotExists() throws PException {
     int replicaCount = 3;
 
     try {
-      toolsClient.isAppHealthy(appName, replicaCount);
+      toolsClient.isAppHealthy(appName, this.tableReplicaCount);
     } catch (PException e) {
       return;
     }
 
     Assert.fail();
   }
+
+  @Test
+  public void testDropApp() throws PException {
+    String appName = "testDropApp";
+
+    toolsClient.createApp(
+        appName,
+        this.tablePartitionCount,
+        this.tableReplicaCount,
+        new HashMap<>(),
+        this.tableOpTimeoutMs);
+    boolean isAppHealthy = toolsClient.isAppHealthy(appName, this.tableReplicaCount);
+    Assert.assertTrue(isAppHealthy);
+
+    toolsClient.dropApp(appName, tableOpTimeoutMs);
+    PegasusClientInterface pClient = PegasusClientFactory.createClient(this.clientOptions);
+
+    try {
+      pClient.openTable(appName);
+    } catch (PException e) {
+      String msg = e.getMessage();
+      Assert.assertTrue(msg.contains("ERR_OBJECT_NOT_FOUND") && msg.contains("No such table"));

Review Comment:
   Check that this exception must be threwed.



-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org


[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #973: feat: add app drop interface to the java client

Posted by GitBox <gi...@apache.org>.
acelyc111 commented on code in PR #973:
URL: https://github.com/apache/incubator-pegasus/pull/973#discussion_r879247217


##########
java-client/src/test/java/org/apache/pegasus/client/TestAdminClient.java:
##########
@@ -27,7 +27,11 @@
 
 public class TestAdminClient {
   PegasusAdminClientInterface toolsClient;
+  PegasusClientInterface pClient;

Review Comment:
   pClient is only used in testDropApp, it's not needed to make it as member.



-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org


[GitHub] [incubator-pegasus] acelyc111 merged pull request #973: feat: add app drop interface to the java client

Posted by GitBox <gi...@apache.org>.
acelyc111 merged PR #973:
URL: https://github.com/apache/incubator-pegasus/pull/973


-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org