GH-191 - Prevent premature access of ApplicationContext from ParameterResolver implementations.

We now avoid accessing the ApplicationContext from a BeforeAllCallback as this might cause the context initialization before other extensions had time to kick in.
This commit is contained in:
Oliver Drotbohm
2023-04-30 17:20:04 +02:00
parent c111e41f2b
commit 6dabfb425b
3 changed files with 42 additions and 43 deletions

View File

@@ -56,8 +56,6 @@ class PublishedEventsParameterResolverUnitTests {
PublishedEventsParameterResolver resolver = new PublishedEventsParameterResolver(__ -> context);
context.refresh();
resolver.beforeAll(null);
Map<String, PublishedEvents> allEvents = new ConcurrentHashMap<>();
List<String> keys = Arrays.asList("first", "second", "third");
CountDownLatch latch = new CountDownLatch(3);
@@ -75,7 +73,6 @@ class PublishedEventsParameterResolverUnitTests {
latch.countDown();
}).start();
}
latch.await(50, TimeUnit.MILLISECONDS);