sodonnel commented on a change in pull request #2689:
URL: https://github.com/apache/ozone/pull/2689#discussion_r717702476



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithFailover.java
##########
@@ -0,0 +1,46 @@
+package org.apache.hadoop.ozone.om;
+
+import org.apache.hadoop.ozone.OzoneConfigKeys;
+import org.apache.hadoop.ozone.om.ha.OMFailoverProxyProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import static 
org.apache.hadoop.ozone.MiniOzoneOMHAClusterImpl.NODE_FAILURE_TIMEOUT;
+
+/**
+ * Test Ozone Manager operation in distributed handler scenario with failover.
+ */
+public class TestOzoneManagerHAWithFailover extends TestOzoneManagerHA {
+  /**
+   * 1. Stop one of the OM
+   * 2. make a call to OM, this will make failover attempts to find new node.
+   * a) if LE finishes but leader not ready, it retries to same node
+   * b) if LE not done, it will failover to new node and check
+   * 3. Try failover to same OM explicitly.
+   * Now #3 should wait additional waitBetweenRetries time.
+   * LE: Leader Election.
+   */
+  @Test
+  public void testIncrementalWaitTimeWithSameNodeFailover() throws Exception {

Review comment:
       Why move this test into a new class? Is it because it modifies the 
mini-cluster in a way we cannot easily fix the cluster later?

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithFailover.java
##########
@@ -0,0 +1,46 @@
+package org.apache.hadoop.ozone.om;
+
+import org.apache.hadoop.ozone.OzoneConfigKeys;
+import org.apache.hadoop.ozone.om.ha.OMFailoverProxyProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+import static 
org.apache.hadoop.ozone.MiniOzoneOMHAClusterImpl.NODE_FAILURE_TIMEOUT;
+
+/**
+ * Test Ozone Manager operation in distributed handler scenario with failover.
+ */
+public class TestOzoneManagerHAWithFailover extends TestOzoneManagerHA {
+  /**
+   * 1. Stop one of the OM
+   * 2. make a call to OM, this will make failover attempts to find new node.
+   * a) if LE finishes but leader not ready, it retries to same node
+   * b) if LE not done, it will failover to new node and check
+   * 3. Try failover to same OM explicitly.
+   * Now #3 should wait additional waitBetweenRetries time.
+   * LE: Leader Election.
+   */
+  @Test
+  public void testIncrementalWaitTimeWithSameNodeFailover() throws Exception {

Review comment:
       OK - makes sense. I think it would be good to add a note in the class 
level comment that this class should not have any further tests added, as the 
cluster cannot be reused. This may help someone in the future if they try to 
add to this class.




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to