Skip to content

Commit 0c86aa9

Browse files
committed
Merge pull request #1130 from mattrjacobs/deflake-max-concurrency-unit-test
Deflaked ThreadPool max-concurrency metrics tests
2 parents ab31bc1 + b228ac5 commit 0c86aa9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hystrix-core/src/test/java/com/netflix/hystrix/metric/consumer/RollingThreadPoolMaxConcurrencyStreamTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ public void testStartsAndEndsInSameBucketProduceValue() throws InterruptedExcept
108108
final CountDownLatch latch = new CountDownLatch(1);
109109
stream.observe().take(10).subscribe(getSubscriber(latch));
110110

111-
Command cmd1 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 10);
112-
Command cmd2 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 14);
111+
Command cmd1 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 50);
112+
Command cmd2 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 40);
113113

114114
cmd1.observe();
115115
Thread.sleep(1);
@@ -411,7 +411,7 @@ public void run() {
411411
System.out.println("ReqLog : " + HystrixRequestLog.getCurrentRequest().getExecutedCommandsAsString());
412412

413413
for (Command rejectedCmd: rejected) {
414-
assertTrue(rejectedCmd.isResponseSemaphoreRejected());
414+
assertTrue(rejectedCmd.isResponseSemaphoreRejected() || rejectedCmd.isResponseShortCircuited());
415415
}
416416
//should be 0 since all are executed in a semaphore
417417
assertEquals(0, stream.getLatestRollingMax());

0 commit comments

Comments
 (0)