File tree 4 files changed +46
-3
lines changed
extensions/smallrye-fault-tolerance/deployment/src/test/java/io/quarkus/smallrye/faulttolerance/test/retry/stackoverflow
4 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 52
52
<smallrye-metrics .version>4.0.0</smallrye-metrics .version>
53
53
<smallrye-open-api .version>4.0.10</smallrye-open-api .version>
54
54
<smallrye-graphql .version>2.12.2</smallrye-graphql .version>
55
- <smallrye-fault-tolerance .version>6.9.0 </smallrye-fault-tolerance .version>
55
+ <smallrye-fault-tolerance .version>6.9.1 </smallrye-fault-tolerance .version>
56
56
<smallrye-jwt .version>4.6.1</smallrye-jwt .version>
57
57
<smallrye-context-propagation .version>2.2.1</smallrye-context-propagation .version>
58
58
<smallrye-reactive-streams-operators .version>1.0.13</smallrye-reactive-streams-operators .version>
Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ implementation("io.quarkus:quarkus-smallrye-fault-tolerance")
576
576
== Additional resources
577
577
578
578
SmallRye Fault Tolerance has more features than shown here.
579
- Please check the link:https://smallrye.io/docs/smallrye-fault-tolerance/6.9.0 /index.html[SmallRye Fault Tolerance documentation] to learn about them.
579
+ Please check the link:https://smallrye.io/docs/smallrye-fault-tolerance/6.9.1 /index.html[SmallRye Fault Tolerance documentation] to learn about them.
580
580
581
581
In Quarkus, you can use the SmallRye Fault Tolerance optional features out of the box.
582
582
@@ -608,7 +608,7 @@ quarkus.fault-tolerance.mp-compatibility=true
608
608
----
609
609
====
610
610
611
- The link:https://smallrye.io/docs/smallrye-fault-tolerance/6.9.0 /reference/programmatic-api.html[programmatic API] is present and integrated with the declarative, annotation-based API.
611
+ The link:https://smallrye.io/docs/smallrye-fault-tolerance/6.9.1 /reference/programmatic-api.html[programmatic API] is present and integrated with the declarative, annotation-based API.
612
612
You can use the `Guard`, `TypedGuard` and `@ApplyGuard` APIs out of the box.
613
613
614
614
Support for Kotlin is present (assuming you use the Quarkus extension for Kotlin), so you can guard your `suspend` functions with fault tolerance annotations.
Original file line number Diff line number Diff line change
1
+ package io .quarkus .smallrye .faulttolerance .test .retry .stackoverflow ;
2
+
3
+ import jakarta .enterprise .context .ApplicationScoped ;
4
+
5
+ import org .eclipse .microprofile .faulttolerance .Fallback ;
6
+ import org .eclipse .microprofile .faulttolerance .Retry ;
7
+
8
+ @ ApplicationScoped
9
+ public class RetryStackOverflowService {
10
+ @ Retry (maxRetries = 10_000 , jitter = 0 )
11
+ @ Fallback (fallbackMethod = "fallback" )
12
+ public String hello () {
13
+ throw new RuntimeException ("trigger retry" );
14
+ }
15
+
16
+ public String fallback () {
17
+ return "fallback" ;
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ package io .quarkus .smallrye .faulttolerance .test .retry .stackoverflow ;
2
+
3
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
4
+
5
+ import jakarta .inject .Inject ;
6
+
7
+ import org .junit .jupiter .api .Test ;
8
+ import org .junit .jupiter .api .extension .RegisterExtension ;
9
+
10
+ import io .quarkus .test .QuarkusUnitTest ;
11
+
12
+ public class RetryStackOverflowTest {
13
+ @ RegisterExtension
14
+ static final QuarkusUnitTest config = new QuarkusUnitTest ()
15
+ .withApplicationRoot (jar -> jar .addClass (RetryStackOverflowService .class ));
16
+
17
+ @ Inject
18
+ RetryStackOverflowService service ;
19
+
20
+ @ Test
21
+ public void test () {
22
+ assertEquals ("fallback" , service .hello ());
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments