pkumarsinha commented on a change in pull request #1086:
URL: https://github.com/apache/hive/pull/1086#discussion_r437861515
##########
File path:
standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/utils/RetryTest.java
##########
@@ -50,8 +56,49 @@ public Void execute() {
};
try {
retriable.run();
+ Assert.fail();
} catch (Exception e) {
Assert.assertEquals(RuntimeException.class, e.getClass());
}
}
+
+ @Test
+ public void testRetryFailureWithDelay() {
+ Retry<Void> retriable = new Retry<Void>(NullPointerException.class) {
+ @Override
+ public Void execute() {
+ throw new RuntimeException();
+ }
+ };
+ try {
+ retriable.runWithDelay();
+ Assert.fail();
+ } catch (Exception e) {
+ Assert.assertEquals(RuntimeException.class, e.getClass());
Review comment:
Add one more assertion for the time taken being more than total time for
all three attempts( i.e 180 sec)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]