private final class ProviderFactory.ProviderProxy extends java.lang.Object implements SurefireProvider
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
providerInOtherClassLoader |
private java.lang.ClassLoader |
testsClassLoader |
Modifier | Constructor and Description |
---|---|
private |
ProviderProxy(java.lang.Object providerInOtherClassLoader,
java.lang.ClassLoader testsClassLoader) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Makes an attempt at cancelling the current run, giving the provider a chance to notify
reporting that the remaining tests have been cancelled due to timeout.
|
java.lang.Iterable<java.lang.Class<?>> |
getSuites()
Determines the number of forks.
|
RunResult |
invoke(java.lang.Object forkTestSet)
Runs a forked test
|
private java.lang.ClassLoader |
swapClassLoader(java.lang.ClassLoader newClassLoader) |
private final java.lang.Object providerInOtherClassLoader
private final java.lang.ClassLoader testsClassLoader
private ProviderProxy(java.lang.Object providerInOtherClassLoader, java.lang.ClassLoader testsClassLoader)
public java.lang.Iterable<java.lang.Class<?>> getSuites()
SurefireProvider
getSuites
in interface SurefireProvider
public RunResult invoke(java.lang.Object forkTestSet) throws TestSetFailedException, ReporterException, java.lang.reflect.InvocationTargetException
SurefireProvider
invoke
in interface SurefireProvider
forkTestSet
- An item from the iterator in #getSuites. Will be null for forkmode never or always.
When this is non-null, the forked process will run only that test
and probably not scan the classpathTestSetFailedException
- When testset failsReporterException
- When reporting failsjava.lang.reflect.InvocationTargetException
- fails in ProviderFactory
private java.lang.ClassLoader swapClassLoader(java.lang.ClassLoader newClassLoader)
public void cancel()
SurefireProvider
cancel
in interface SurefireProvider