File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
test-framework/junit5/src/main/java/io/quarkus/test/junit Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ class MockSupport {
13
13
14
14
private static final Deque <List <Object >> contexts = new ArrayDeque <>();
15
15
16
- static void pushContext () {
16
+ static synchronized void pushContext () {
17
17
contexts .push (new ArrayList <>());
18
18
}
19
19
20
- static void popContext () {
20
+ static synchronized void popContext () {
21
21
if (contexts .isEmpty ()) {
22
22
return ; // can happen on error in QuarkusTestResourceLifecycleManagers etc.
23
23
}
@@ -38,7 +38,7 @@ static void popContext() {
38
38
}
39
39
}
40
40
41
- static <T > void installMock (T instance , T mock ) {
41
+ static synchronized <T > void installMock (T instance , T mock ) {
42
42
//due to class loading issues we can't access the interface directly
43
43
List <Object > inst = contexts .peek ();
44
44
if (inst == null ) {
You can’t perform that action at this time.
0 commit comments