Skip to content

Commit

Permalink
Lengthen timeout in command unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jacobs committed Jun 14, 2016
1 parent cc75a69 commit 4253c4b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ public void testExecutionTimeoutWithFallbackUsingSemaphoreIsolation() {
*/
@Test
public void testExecutionTimeoutFallbackFailureUsingSemaphoreIsolation() {
TestHystrixObservableCommand<Integer> command = getCommand(ExecutionIsolationStrategy.SEMAPHORE, AbstractTestHystrixCommand.ExecutionResult.SUCCESS, 200, AbstractTestHystrixCommand.FallbackResult.FAILURE, 100);
TestHystrixObservableCommand<Integer> command = getCommand(ExecutionIsolationStrategy.SEMAPHORE, AbstractTestHystrixCommand.ExecutionResult.SUCCESS, 500, AbstractTestHystrixCommand.FallbackResult.FAILURE, 200);
try {
command.observe().toBlocking().single();
fail("we shouldn't get here");
Expand All @@ -742,8 +742,8 @@ public void testExecutionTimeoutFallbackFailureUsingSemaphoreIsolation() {
fail("the exception should be HystrixRuntimeException");
}
}
// the time should be 50+ since we timeout at 50ms
assertTrue("Execution Time is: " + command.getExecutionTimeInMilliseconds(), command.getExecutionTimeInMilliseconds() >= 50);
// the time should be 200+ since we timeout at 200ms
assertTrue("Execution Time is: " + command.getExecutionTimeInMilliseconds(), command.getExecutionTimeInMilliseconds() >= 200);
assertCommandExecutionEvents(command, HystrixEventType.TIMEOUT, HystrixEventType.FALLBACK_FAILURE);
assertEquals(0, command.metrics.getCurrentConcurrentExecutionCount());
assertSaneHystrixRequestLog(1);
Expand Down

0 comments on commit 4253c4b

Please sign in to comment.