Skip to content

Commit 89e128d

Browse files
committed
* test: update junit to 6.0.0
Signed-off-by: neo <1100909+neowu@users.noreply.github.com>
1 parent 4d2852e commit 89e128d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core-ng-test/src/main/java/core/framework/test/IntegrationExtension.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ public final class IntegrationExtension implements TestInstancePostProcessor {
1414
public void postProcessTestInstance(Object testInstance, ExtensionContext context) {
1515
ExtensionContext.Store store = context.getRoot().getStore(ExtensionContext.Namespace.GLOBAL);
1616
Class<?> testClass = context.getRequiredTestClass();
17-
AbstractTestModule module = store.computeIfAbsent(AbstractTestModule.class, key -> createTestModule(testClass, store), AbstractTestModule.class);
17+
AbstractTestModule module = store.computeIfAbsent(AbstractTestModule.class, _ -> createTestModule(testClass, store), AbstractTestModule.class);
1818
module.inject(testInstance);
1919
}
2020

2121
private AbstractTestModule createTestModule(Class<?> testClass, ExtensionContext.Store store) {
2222
Boolean initialized = store.get(KEY_INITIALIZED, Boolean.class);
2323
if (Boolean.TRUE.equals(initialized)) throw new Error("test context failed to initialize, please check error message from previous integration test");
24-
store.put(KEY_INITIALIZED, Boolean.TRUE);
24+
store.computeIfAbsent(KEY_INITIALIZED, _ -> Boolean.TRUE, Boolean.class);
25+
2526
Context context = findContext(testClass);
2627
try {
2728
AbstractTestModule module = context.module().getConstructor().newInstance();

0 commit comments

Comments
 (0)