Skip to content

Commit

Permalink
[CALCITE-6855] Report elapsed time in ConnectionPropertiesHATest assert
Browse files Browse the repository at this point in the history
  • Loading branch information
stoty committed Feb 25, 2025
1 parent c8e57f2 commit 8f9f52d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,11 @@ public void testConnectionPropertiesHAHttpConnectionTimeout5Sec() throws Excepti
} catch (RuntimeException re) {
long endTime = System.currentTimeMillis();
long elapsedTime = endTime - startTime;
Assert.assertTrue(elapsedTime < Timeout.ofMinutes(3).toMilliseconds());
Assert.assertTrue(elapsedTime >= 5000);
Assert.assertTrue(re.getCause() instanceof ConnectTimeoutException);
Assert.assertTrue("Elapsed time: " + elapsedTime + " ms, expected less than 3 minutes",
elapsedTime < Timeout.ofMinutes(3).toMilliseconds());
Assert.assertTrue("Elapsed time: " + elapsedTime + " ms, expected at least 5000 ms",
elapsedTime >= 5000);
}
}

Expand Down

0 comments on commit 8f9f52d

Please sign in to comment.