You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TestCommandRejectioncommand1 = newTestCommandRejection(circuitBreaker, pool, 500, 600, TestCommandRejection.FALLBACK_FAILURE);
1081
-
TestCommandRejectioncommand2 = newTestCommandRejection(circuitBreaker, pool, 500, 600, TestCommandRejection.FALLBACK_FAILURE);
1066
+
TestCommandRejectioncommand1 = newTestCommandRejection(circuitBreaker, pool, 500, 600, TestCommandRejection.FALLBACK_FAILURE); //this should pass through the queue and sit in the pool
1067
+
TestCommandRejectioncommand2 = newTestCommandRejection(circuitBreaker, pool, 500, 600, TestCommandRejection.FALLBACK_SUCCESS); //this should sit in the queue
1068
+
TestCommandRejectioncommand3 = newTestCommandRejection(circuitBreaker, pool, 500, 600, TestCommandRejection.FALLBACK_FAILURE); //this should observe full queue and get rejected
1082
1069
Future<Boolean> f1 = null;
1070
+
Future<Boolean> f2 = null;
1083
1071
try {
1084
1072
f1 = command1.queue();
1085
-
assertEquals(false, command2.queue().get());
1073
+
f2 = command2.queue();
1074
+
assertEquals(false, command3.queue().get()); //should get thread-pool rejected
1086
1075
fail("we shouldn't get here");
1087
1076
} catch (Exceptione) {
1088
1077
e.printStackTrace();
@@ -1099,17 +1088,20 @@ public void run() {
1099
1088
}
1100
1089
1101
1090
assertCommandExecutionEvents(command1); //still in-flight, no events yet
assertEquals(1, circuitBreaker.metrics.getCurrentConcurrentExecutionCount()); //pool-filler still going
1104
-
//This is a case where we knowingly walk away from an executing Hystrix thread (the pool-filler). It should have an in-flight status ("Executed"). You should avoid this in a production environment
1094
+
//This is a case where we knowingly walk away from executing Hystrix threads. They should have an in-flight status ("Executed"). You should avoid this in a production environment
0 commit comments