7
7
import org .junit .jupiter .api .Test ;
8
8
import org .junit .jupiter .params .ParameterizedTest ;
9
9
import org .junit .jupiter .params .provider .ValueSource ;
10
- import org .junit .jupiter .api .extension .ExtendWith ;
11
10
12
11
import java .time .Duration ;
13
12
import java .util .concurrent .TimeoutException ;
25
24
* client operations and sends invocation instructions to the DurableTaskWorker).
26
25
*/
27
26
@ Tag ("integration" )
28
- @ ExtendWith (TestRetryExtension .class )
29
27
public class ErrorHandlingIntegrationTests extends IntegrationTestBase {
28
+
30
29
@ BeforeEach
31
30
private void startUp () {
32
- DurableTaskClient client = new DurableTaskGrpcClientBuilder ().build ();
33
- client .deleteTaskHub ();
31
+ try (DurableTaskClient client = new DurableTaskGrpcClientBuilder ().build ()) {
32
+ client .deleteTaskHub ();
33
+ }
34
34
}
35
35
36
- @ RetryingTest
36
+ @ Test
37
37
void orchestratorException () throws TimeoutException {
38
38
final String orchestratorName = "OrchestratorWithException" ;
39
39
final String errorMessage = "Kah-BOOOOOM!!!" ;
@@ -59,7 +59,7 @@ void orchestratorException() throws TimeoutException {
59
59
}
60
60
}
61
61
62
- @ RetryingParameterizedTest
62
+ @ ParameterizedTest
63
63
@ ValueSource (booleans = {true , false })
64
64
void activityException (boolean handleException ) throws TimeoutException {
65
65
final String orchestratorName = "OrchestratorWithActivityException" ;
@@ -111,7 +111,7 @@ void activityException(boolean handleException) throws TimeoutException {
111
111
}
112
112
}
113
113
114
- @ RetryingParameterizedTest
114
+ @ ParameterizedTest
115
115
@ ValueSource (ints = {1 , 2 , 10 })
116
116
public void retryActivityFailures (int maxNumberOfAttempts ) throws TimeoutException {
117
117
// There is one task for each activity call and one task between each retry
@@ -125,7 +125,7 @@ public void retryActivityFailures(int maxNumberOfAttempts) throws TimeoutExcepti
125
125
});
126
126
}
127
127
128
- @ RetryingParameterizedTest
128
+ @ ParameterizedTest
129
129
@ ValueSource (ints = {1 , 2 , 10 })
130
130
public void retryActivityFailuresWithCustomLogic (int maxNumberOfAttempts ) throws TimeoutException {
131
131
// This gets incremented every time the retry handler is invoked
@@ -142,7 +142,7 @@ public void retryActivityFailuresWithCustomLogic(int maxNumberOfAttempts) throws
142
142
assertEquals (maxNumberOfAttempts , retryHandlerCalls .get ());
143
143
}
144
144
145
- @ RetryingParameterizedTest
145
+ @ ParameterizedTest
146
146
@ ValueSource (booleans = {true , false })
147
147
void subOrchestrationException (boolean handleException ) throws TimeoutException {
148
148
final String orchestratorName = "OrchestrationWithBustedSubOrchestrator" ;
@@ -192,7 +192,7 @@ void subOrchestrationException(boolean handleException) throws TimeoutException
192
192
}
193
193
}
194
194
195
- @ RetryingParameterizedTest
195
+ @ ParameterizedTest
196
196
@ ValueSource (ints = {1 , 2 , 10 })
197
197
public void retrySubOrchestratorFailures (int maxNumberOfAttempts ) throws TimeoutException {
198
198
// There is one task for each sub-orchestrator call and one task between each retry
@@ -207,7 +207,7 @@ public void retrySubOrchestratorFailures(int maxNumberOfAttempts) throws Timeout
207
207
});
208
208
}
209
209
210
- @ RetryingParameterizedTest
210
+ @ ParameterizedTest
211
211
@ ValueSource (ints = {1 , 2 , 10 })
212
212
public void retrySubOrchestrationFailuresWithCustomLogic (int maxNumberOfAttempts ) throws TimeoutException {
213
213
// This gets incremented every time the retry handler is invoked
0 commit comments