Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<db2-jdbc.version>12.1.0.0</db2-jdbc.version>
<shrinkwrap.version>1.2.6</shrinkwrap.version>
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
<junit.jupiter.version>5.13.4</junit.jupiter.version>
<junit.jupiter.version>6.0.0</junit.jupiter.version>
<infinispan.version>15.0.19.Final</infinispan.version>
<infinispan.protostream.version>5.0.13.Final</infinispan.protostream.version>
<caffeine.version>3.2.2</caffeine.version>
Expand Down
2 changes: 1 addition & 1 deletion devtools/gradle/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugin-publish = "2.0.0"
kotlin = "2.2.20"
smallrye-config = "3.14.0"

junit5 = "5.13.4"
junit5 = "6.0.0"
assertj = "3.27.6"

[plugins]
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/arc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<version.smallrye-common>2.13.9</version.smallrye-common>
<!-- test versions -->
<version.assertj>3.27.6</version.assertj>
<version.junit5>5.13.4</version.junit5>
<version.junit5>6.0.0</version.junit5>
<version.kotlin>2.2.20</version.kotlin>
<version.kotlin-coroutines>1.10.2</version.kotlin-coroutines>
<version.mockito>5.20.0</version.mockito>
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<assertj.version>3.27.6</assertj.version>
<eclipse-minimal-json.version>0.9.5</eclipse-minimal-json.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
<junit5.version>5.13.4</junit5.version>
<junit5.version>6.0.0</junit5.version>
<maven-core.version>3.9.11</maven-core.version><!-- Keep in sync with sisu.version -->
<sisu.version>0.9.0.M4</sisu.version><!-- Keep in sync with maven-core.version -->
<maven-plugin-annotations.version>3.15.1</maven-plugin-annotations.version>
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/extension-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<maven-core.version>3.9.11</maven-core.version>
<jackson-bom.version>2.20.0</jackson-bom.version>
<smallrye-beanbag.version>1.5.3</smallrye-beanbag.version>
<junit5.version>5.13.4</junit5.version>
<junit5.version>6.0.0</junit5.version>
<mockito.version>5.20.0</mockito.version>
</properties>
<build>
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/junit5-virtual-threads/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<jandex.version>3.5.0</jandex.version>
<smallrye-common.version>2.13.9</smallrye-common.version>

<junit5.version>5.13.4</junit5.version>
<junit5.version>6.0.0</junit5.version>
<assertj.version>3.27.6</assertj.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;

import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
Expand Down Expand Up @@ -158,6 +159,11 @@ public Optional<Class<?>> getTestClass() {
return Optional.of(TestClass.class);
}

@Override
public Class<?> getRequiredTestClass() {
return ExtensionContext.super.getRequiredTestClass();
}

@Override
public Optional<TestInstance.Lifecycle> getTestInstanceLifecycle() {
return Optional.empty();
Expand All @@ -168,11 +174,21 @@ public Optional<Object> getTestInstance() {
return Optional.empty();
}

@Override
public Object getRequiredTestInstance() {
return ExtensionContext.super.getRequiredTestInstance();
}

@Override
public Optional<TestInstances> getTestInstances() {
return Optional.empty();
}

@Override
public TestInstances getRequiredTestInstances() {
return ExtensionContext.super.getRequiredTestInstances();
}

public void setMethod(Method method) {
this.method = method;
}
Expand All @@ -182,6 +198,11 @@ public Optional<Method> getTestMethod() {
return Optional.ofNullable(method);
}

@Override
public Method getRequiredTestMethod() {
return ExtensionContext.super.getRequiredTestMethod();
}

@Override
public Optional<Throwable> getExecutionException() {
return Optional.empty();
Expand All @@ -193,7 +214,8 @@ public Optional<String> getConfigurationParameter(String s) {
}

@Override
public <T> Optional<T> getConfigurationParameter(String s, Function<String, T> function) {
public <T> Optional<T> getConfigurationParameter(String key,
Function<? super String, ? extends @Nullable T> transformer) {
return Optional.empty();
}

Expand All @@ -202,6 +224,21 @@ public void publishReportEntry(Map<String, String> map) {

}

@Override
public void publishReportEntry(String key, String value) {
ExtensionContext.super.publishReportEntry(key, value);
}

@Override
public void publishReportEntry(String value) {
ExtensionContext.super.publishReportEntry(value);
}

@Override
public void publishFile(String name, org.junit.jupiter.api.MediaType mediaType, ThrowingConsumer<Path> action) {

}

@Override
public TestStore getStore(Namespace namespace) {
return store;
Expand Down Expand Up @@ -250,6 +287,7 @@ public List<RecordedEvent> stop() {
}
}

@SuppressWarnings("unchecked")
private static class TestStore implements ExtensionContext.Store {

private final Map<Object, Object> store = new ConcurrentHashMap<>();
Expand All @@ -274,15 +312,34 @@ public <V> V get(Object o, Class<V> aClass) {
}

@Override
@SuppressWarnings("unchecked")
public <K, V> Object getOrComputeIfAbsent(K key, Function<K, V> function) {
return store.computeIfAbsent(key, o -> function.apply((K) o));
public <V> V getOrDefault(Object key, Class<V> requiredType, V defaultValue) {
return ExtensionContext.Store.super.getOrDefault(key, requiredType, defaultValue);
}

@Override
@SuppressWarnings("unchecked")
public <K, V> V getOrComputeIfAbsent(K key, Function<K, V> function, Class<V> aClass) {
return aClass.cast(store.computeIfAbsent(key, o -> function.apply((K) o)));
public <V> V computeIfAbsent(Class<V> type) {
return ExtensionContext.Store.super.computeIfAbsent(type);
}

@Override
public @Nullable <K, V> Object getOrComputeIfAbsent(K key, Function<? super K, ? extends V> defaultCreator) {
return store.computeIfAbsent(key, (Function<? super Object, ?>) defaultCreator);
}

@Override
public <K, V> Object computeIfAbsent(K key, Function<? super K, ? extends V> defaultCreator) {
return store.computeIfAbsent(key, (Function<? super Object, ?>) defaultCreator);
}

@Override
public <K, V> @Nullable V getOrComputeIfAbsent(K key, Function<? super K, ? extends V> defaultCreator,
Class<V> requiredType) {
return requiredType.cast(store.computeIfAbsent(key, (Function<? super Object, ?>) defaultCreator));
}

@Override
public <K, V> V computeIfAbsent(K key, Function<? super K, ? extends V> defaultCreator, Class<V> requiredType) {
return requiredType.cast(store.computeIfAbsent(key, (Function<? super Object, ?>) defaultCreator));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/qute/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.junit>5.13.4</version.junit>
<version.junit>6.0.0</version.junit>
<version.assertj>3.27.6</version.assertj>
<version.jandex>3.5.0</version.jandex>
<version.gizmo2>2.0.0.Beta6</version.gizmo2>
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/resteasy-reactive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<jakarta.enterprise.cdi-api.version>4.1.0</jakarta.enterprise.cdi-api.version>
<jandex.version>3.5.0</jandex.version>
<bytebuddy.version>1.15.11</bytebuddy.version>
<junit5.version>5.13.4</junit5.version>
<junit5.version>6.0.0</junit5.version>
<maven.version>3.9.11</maven.version>
<assertj.version>3.27.6</assertj.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<assertj.version>3.27.6</assertj.version>
<jackson-bom.version>2.20.0</jackson-bom.version>
<jakarta.enterprise.cdi-api.version>4.1.0</jakarta.enterprise.cdi-api.version>
<junit5.version>5.13.4</junit5.version>
<junit5.version>6.0.0</junit5.version>
<commons-compress.version>1.28.0</commons-compress.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
<mockito.version>5.20.0</mockito.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.BeforeTestExecutionCallback;
import org.junit.jupiter.api.extension.DynamicTestInvocationContext;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.extension.InvocationInterceptor;
import org.junit.jupiter.api.extension.ParameterContext;
Expand Down Expand Up @@ -862,7 +863,8 @@ public void interceptTestMethod(Invocation<Void> invocation, ReflectiveInvocatio
}

@Override
public void interceptDynamicTest(Invocation<Void> invocation, ExtensionContext extensionContext) throws Throwable {
public void interceptDynamicTest(Invocation<Void> invocation,
DynamicTestInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable {
// TODO check if this is needed; the earlier interceptor may already have done it
if (runningQuarkusApplication == null) {
invocation.proceed();
Expand Down
Loading