@@ -53,6 +53,7 @@ public void testTimeoutThenRetryWithBlockedSupplier() {
5353 throw new Exception ();
5454 }, e -> {
5555 assertEquals (e .getAttemptCount (), 3 );
56+ assertEquals (e .getExecutionCount (), 3 );
5657 assertEquals (timeoutCounter .get (), 3 );
5758 assertEquals (retryPolicyCounter .get (), 2 );
5859 }, TimeoutExceededException .class );
@@ -92,6 +93,7 @@ public void testTimeoutThenRetryWithPendingRetry() {
9293 throw new IllegalStateException ();
9394 }, e -> {
9495 assertEquals (e .getAttemptCount (), 3 );
96+ assertEquals (e .getExecutionCount (), 3 );
9597 assertEquals (executionCounter .get (), 3 );
9698 assertEquals (timeoutSuccessCounter .get (), 3 );
9799 assertEquals (timeoutFailureCounter .get (), 0 );
@@ -133,6 +135,7 @@ public void testRetryThenTimeoutWithBlockedSupplier() {
133135 throw new Exception ();
134136 }, e -> {
135137 assertEquals (e .getAttemptCount (), 1 );
138+ assertEquals (e .getExecutionCount (), 1 );
136139 assertEquals (executionCounter .get (), 1 );
137140 assertEquals (timeoutCounter .get (), 1 );
138141 }, TimeoutExceededException .class );
@@ -177,6 +180,7 @@ public void testRetryThenTimeoutWithPendingRetry() {
177180 throw new Exception ();
178181 }, e -> {
179182 assertEquals (e .getAttemptCount (), 1 );
183+ assertEquals (e .getExecutionCount (), 1 );
180184 assertEquals (executionCounter .get (), 1 );
181185 assertEquals (timeoutCounter .get (), 1 );
182186 assertEquals (failedAttemptCounter .get (), 1 );
@@ -216,6 +220,7 @@ public void testTimeoutThenFallbackWithBlockedSupplier() {
216220 throw new Exception ();
217221 }, e -> {
218222 assertEquals (e .getAttemptCount (), 1 );
223+ assertEquals (e .getExecutionCount (), 1 );
219224 assertEquals (timeoutCounter .get (), 1 );
220225 assertEquals (fallbackCounter .get (), 1 );
221226 }, IllegalStateException .class );
@@ -253,6 +258,7 @@ public void testTimeoutThenFallback() {
253258 throw new Exception ();
254259 }, e -> {
255260 assertEquals (e .getAttemptCount (), 1 );
261+ assertEquals (e .getExecutionCount (), 1 );
256262 assertEquals (timeoutCounter .get (), 0 );
257263 assertEquals (fallbackCounter .get (), 1 );
258264 }, IllegalStateException .class );
@@ -291,6 +297,7 @@ public void testFallbackThenTimeoutWithBlockedSupplier() {
291297 throw new Exception ();
292298 }, e -> {
293299 assertEquals (e .getAttemptCount (), 1 );
300+ assertEquals (e .getExecutionCount (), 1 );
294301 assertEquals (timeoutCounter .get (), 1 );
295302 assertEquals (fallbackCounter .get (), 0 );
296303 }, TimeoutExceededException .class );
@@ -329,6 +336,7 @@ public void testFallbackThenTimeoutWithBlockedFallback() {
329336 throw new Exception ();
330337 }, e -> {
331338 assertEquals (e .getAttemptCount (), 1 );
339+ assertEquals (e .getExecutionCount (), 1 );
332340 assertEquals (timeoutCounter .get (), 1 );
333341 assertEquals (fallbackCounter .get (), 1 );
334342 }, TimeoutExceededException .class );
0 commit comments