File tree 2 files changed +5
-4
lines changed
tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 44
44
import org .jboss .shrinkwrap .api .asset .EmptyAsset ;
45
45
import org .jboss .shrinkwrap .api .spec .JavaArchive ;
46
46
import org .jboss .shrinkwrap .api .spec .WebArchive ;
47
- import org .testng .annotations .BeforeTest ;
47
+ import org .testng .annotations .BeforeMethod ;
48
48
import org .testng .annotations .Test ;
49
49
50
50
import jakarta .inject .Inject ;
@@ -75,7 +75,7 @@ public static WebArchive deploy() {
75
75
@ Inject
76
76
private CircuitBreakerMetricBean cbBean ;
77
77
78
- @ BeforeTest
78
+ @ BeforeMethod
79
79
public void closeTheCircuit () throws Exception {
80
80
81
81
// Condition is needed because BeforeTest runs on both client and server
Original file line number Diff line number Diff line change 53
53
import org .jboss .shrinkwrap .api .asset .StringAsset ;
54
54
import org .jboss .shrinkwrap .api .spec .JavaArchive ;
55
55
import org .jboss .shrinkwrap .api .spec .WebArchive ;
56
- import org .testng .annotations .BeforeTest ;
56
+ import org .testng .annotations .BeforeMethod ;
57
57
import org .testng .annotations .Test ;
58
58
59
59
import io .opentelemetry .sdk .autoconfigure .spi .AutoConfigurationCustomizerProvider ;
@@ -90,7 +90,7 @@ public static WebArchive deploy() {
90
90
@ Inject
91
91
private CircuitBreakerMetricBean cbBean ;
92
92
93
- @ BeforeTest
93
+ @ BeforeMethod
94
94
public void closeTheCircuit () throws Exception {
95
95
96
96
// Condition is needed because BeforeTest runs on both client and server
@@ -120,6 +120,7 @@ public void closeTheCircuit() throws Exception {
120
120
@ Test
121
121
public void testCircuitBreakerMetric () throws Exception {
122
122
TelemetryMetricGetter m = new TelemetryMetricGetter (CircuitBreakerMetricBean .class , "doWork" );
123
+ m .baselineMetrics ();
123
124
124
125
// First failure, circuit remains closed
125
126
expectTestException (() -> cbBean .doWork (Result .FAIL ));
You can’t perform that action at this time.
0 commit comments