Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: junit-team/junit5
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f6fe9f1ba0964d66784ff164a3a6b10502105c59
Choose a base ref
..
head repository: junit-team/junit5
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 02ef45b979b157e681de26626de2db0ece40d6d8
Choose a head ref
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
import org.apiguardian.api.API;
import org.junit.platform.commons.JUnitException;
import org.junit.platform.engine.reporting.OutputDirectoryProvider;
import org.junit.platform.engine.support.store.NamespacedHierarchicalStore;

/**
* {@code EngineDiscoveryRequest} provides a {@link TestEngine} access to the
@@ -94,4 +95,7 @@ default OutputDirectoryProvider getOutputDirectoryProvider() {
throw new JUnitException(
"OutputDirectoryProvider not available; probably due to unaligned versions of the junit-platform-engine and junit-platform-launcher jars on the classpath/module path.");
}

@API(status = EXPERIMENTAL, since = "5.13")
NamespacedHierarchicalStore<Namespace> getStore();
}
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ public int hashCode() {
* existing sequence of parts in this namespace.
*
* @return new namespace; never {@code null}
* @since 5.8
* @since 5.13
*/
@API(status = STABLE, since = "5.13")
public Namespace append(Object... parts) {
@@ -80,6 +80,6 @@ public Namespace append(Object... parts) {
ArrayList<Object> newParts = new ArrayList<>(this.parts.size() + parts.length);
newParts.addAll(this.parts);
Collections.addAll(newParts, parts);
return new Namespgitace(newParts);
return new Namespace(newParts);
}
}
Original file line number Diff line number Diff line change
@@ -19,6 +19,8 @@
import org.junit.platform.engine.DiscoveryFilter;
import org.junit.platform.engine.DiscoverySelector;
import org.junit.platform.engine.EngineDiscoveryRequest;
import org.junit.platform.engine.Namespace;
import org.junit.platform.engine.support.store.NamespacedHierarchicalStore;

/**
* {@code LauncherDiscoveryRequest} extends the {@link EngineDiscoveryRequest} API
@@ -96,4 +98,6 @@ default LauncherDiscoveryListener getDiscoveryListener() {
return LauncherDiscoveryListener.NOOP;
}

NamespacedHierarchicalStore<Namespace> getStore();

}
Original file line number Diff line number Diff line change
@@ -20,7 +20,9 @@
import org.junit.platform.engine.DiscoveryFilter;
import org.junit.platform.engine.DiscoverySelector;
import org.junit.platform.engine.EngineDiscoveryRequest;
import org.junit.platform.engine.Namespace;
import org.junit.platform.engine.reporting.OutputDirectoryProvider;
import org.junit.platform.engine.support.store.NamespacedHierarchicalStore;
import org.junit.platform.launcher.EngineFilter;
import org.junit.platform.launcher.LauncherDiscoveryListener;
import org.junit.platform.launcher.LauncherDiscoveryRequest;
@@ -54,14 +56,17 @@ final class DefaultDiscoveryRequest implements LauncherDiscoveryRequest {

private final OutputDirectoryProvider outputDirectoryProvider;

private final NamespacedHierarchicalStore<Namespace> store;

DefaultDiscoveryRequest(List<DiscoverySelector> selectors, List<EngineFilter> engineFilters,
List<DiscoveryFilter<?>> discoveryFilters, List<PostDiscoveryFilter> postDiscoveryFilters,
LauncherConfigurationParameters configurationParameters, LauncherDiscoveryListener discoveryListener,
OutputDirectoryProvider outputDirectoryProvider) {
NamespacedHierarchicalStore<Namespace> store, LauncherConfigurationParameters configurationParameters,
LauncherDiscoveryListener discoveryListener, OutputDirectoryProvider outputDirectoryProvider) {
this.selectors = selectors;
this.engineFilters = engineFilters;
this.discoveryFilters = discoveryFilters;
this.postDiscoveryFilters = postDiscoveryFilters;
this.store = store;
this.configurationParameters = configurationParameters;
this.discoveryListener = discoveryListener;
this.outputDirectoryProvider = outputDirectoryProvider;
@@ -99,6 +104,11 @@ public LauncherDiscoveryListener getDiscoveryListener() {
return this.discoveryListener;
}

@Override
public NamespacedHierarchicalStore<Namespace> getStore() {
return this.store;
}

@Override
public OutputDirectoryProvider getOutputDirectoryProvider() {
return this.outputDirectoryProvider;
Original file line number Diff line number Diff line change
@@ -29,7 +29,9 @@
import org.junit.platform.engine.DiscoveryFilter;
import org.junit.platform.engine.DiscoverySelector;
import org.junit.platform.engine.Filter;
import org.junit.platform.engine.Namespace;
import org.junit.platform.engine.reporting.OutputDirectoryProvider;
import org.junit.platform.engine.support.store.NamespacedHierarchicalStore;
import org.junit.platform.launcher.EngineFilter;
import org.junit.platform.launcher.LauncherConstants;
import org.junit.platform.launcher.LauncherDiscoveryListener;
@@ -110,6 +112,8 @@ public final class LauncherDiscoveryRequestBuilder {
private final Map<String, String> configurationParameters = new HashMap<>();
private final List<String> configurationParametersResources = new ArrayList<>();
private final List<LauncherDiscoveryListener> discoveryListeners = new ArrayList<>();
// TODO[#4252] Use the session-level store as its parent.
private final NamespacedHierarchicalStore<Namespace> store = new NamespacedHierarchicalStore<>(null);
private boolean implicitConfigurationParametersEnabled = true;
private ConfigurationParameters parentConfigurationParameters;
private OutputDirectoryProvider outputDirectoryProvider;
@@ -336,7 +340,8 @@ public LauncherDiscoveryRequest build() {
LauncherDiscoveryListener discoveryListener = getLauncherDiscoveryListener(launcherConfigurationParameters);
OutputDirectoryProvider outputDirectoryProvider = getOutputDirectoryProvider(launcherConfigurationParameters);
return new DefaultDiscoveryRequest(this.selectors, this.engineFilters, this.discoveryFilters,
this.postDiscoveryFilters, launcherConfigurationParameters, discoveryListener, outputDirectoryProvider);
this.postDiscoveryFilters, this.store, launcherConfigurationParameters, discoveryListener,
outputDirectoryProvider);
}

private OutputDirectoryProvider getOutputDirectoryProvider(