shahrs87 commented on code in PR #2198:
URL: https://github.com/apache/phoenix/pull/2198#discussion_r2162212101


##########
phoenix-core/src/it/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionIT.java:
##########
@@ -250,6 +257,48 @@ public void testCluster1OfflineRole() throws Exception {
         }
     }
 
+    /**
+     * Test Phoenix connection creation and basic operations with HBase both 
cluster is ACTIVE_TO_STANDBY role.
+     */
+    @Test
+    public void bothClusterATSRole() throws Exception {
+        CLUSTERS.transitClusterRole(haGroup, ClusterRole.ACTIVE_TO_STANDBY, 
ClusterRole.ACTIVE_TO_STANDBY);
+        try (Connection conn = getParallelConnection()) {
+            doTestBasicOperationsWithConnection(conn, tableName, haGroupName);
+        } catch (SQLException e) {

Review Comment:
   We need to have assert.fail statement either in try or catch block? I assume 
since both the clusters are in ATS state, these operations will fail so we need 
to have assert.fail statement in try block? 



##########
phoenix-core/src/it/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionIT.java:
##########
@@ -250,6 +257,48 @@ public void testCluster1OfflineRole() throws Exception {
         }
     }
 
+    /**
+     * Test Phoenix connection creation and basic operations with HBase both 
cluster is ACTIVE_TO_STANDBY role.
+     */
+    @Test
+    public void bothClusterATSRole() throws Exception {
+        CLUSTERS.transitClusterRole(haGroup, ClusterRole.ACTIVE_TO_STANDBY, 
ClusterRole.ACTIVE_TO_STANDBY);
+        try (Connection conn = getParallelConnection()) {
+            doTestBasicOperationsWithConnection(conn, tableName, haGroupName);
+        } catch (SQLException e) {
+            assertTrue(containsMutationBlockedException(e));
+        }
+    }
+
+    /**
+     * Test Phoenix connection creation and basic operations with HBase one 
cluster is ACTIVE_TO_STANDBY role.
+     */
+    @Test
+    public void oneClusterATSRole() throws Exception {
+        CLUSTERS.transitClusterRole(haGroup, ClusterRole.ACTIVE_TO_STANDBY, 
ClusterRole.ACTIVE);
+        int countExceptions = 0;
+        try (Connection conn = getParallelConnection()) {
+            doTestBasicOperationsWithConnection(conn, tableName, haGroupName);
+        } catch (SQLException e) {

Review Comment:
   similar comment as above.



##########
phoenix-core/src/it/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionIT.java:
##########
@@ -250,6 +257,48 @@ public void testCluster1OfflineRole() throws Exception {
         }
     }
 
+    /**
+     * Test Phoenix connection creation and basic operations with HBase both 
cluster is ACTIVE_TO_STANDBY role.
+     */
+    @Test
+    public void bothClusterATSRole() throws Exception {
+        CLUSTERS.transitClusterRole(haGroup, ClusterRole.ACTIVE_TO_STANDBY, 
ClusterRole.ACTIVE_TO_STANDBY);
+        try (Connection conn = getParallelConnection()) {
+            doTestBasicOperationsWithConnection(conn, tableName, haGroupName);
+        } catch (SQLException e) {

Review Comment:
   Do we have any checks whether both the clusters can be in ATS state? I know 
we have check where both the clusters cannot be in ACTIVE state.



-- 
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: issues-unsubscr...@phoenix.apache.org

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

Reply via email to