Class TestProvidingInputStream
java.lang.Object
java.io.InputStream
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractForkInputStream
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandStream
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestProvidingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
,NotifiableTestStream
An
The Stream provides only one test at a time, but only after
After providing each test class name, followed by a newline character, a flush is performed on the
The instance is used only in reusable forks in
InputStream
that, when read, provides test class names out of a queue.
The Stream provides only one test at a time, but only after
provideNewTest()
has been invoked.
After providing each test class name, followed by a newline character, a flush is performed on the
FlushReceiver
provided by the FlushReceiverProvider
that can be set using
AbstractForkInputStream.setFlushReceiverProvider(FlushReceiverProvider)
.
The instance is used only in reusable forks in
ForkStarter
by one Thread.- Author:
- Andreas Gudian, Tibor Digana (tibor17)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
Possibly waiting for next command (seeAbstractCommandStream.nextCommand()
) unless the stream is atomically closed (seeAbstractCommandStream.isClosed()
returnstrue
) before this method has returned.void
close()
protected boolean
isClosed()
protected org.apache.maven.surefire.booter.Command
void
noop()
void
Signal that a new test is to be provided.void
shutdown
(org.apache.maven.surefire.booter.Shutdown shutdownType) void
Sends an event to a fork jvm in order to skip tests.Methods inherited from class org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandStream
canContinue, invalidateInternalBuffer, read
Methods inherited from class org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractForkInputStream
setFlushReceiverProvider, tryFlush
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
TestProvidingInputStream
C'tor- Parameters:
testClassNames
- source of the tests to be read from this stream
-
-
Method Details
-
skipSinceNextTest
public void skipSinceNextTest()Description copied from interface:NotifiableTestStream
Sends an event to a fork jvm in order to skip tests. Returns immediately without blocking. -
shutdown
public void shutdown(org.apache.maven.surefire.booter.Shutdown shutdownType) -
noop
public void noop() -
acknowledgeByeEventReceived
public void acknowledgeByeEventReceived() -
nextCommand
protected org.apache.maven.surefire.booter.Command nextCommand()- Specified by:
nextCommand
in classAbstractCommandStream
-
beforeNextCommand
Description copied from class:AbstractCommandStream
Possibly waiting for next command (seeAbstractCommandStream.nextCommand()
) unless the stream is atomically closed (seeAbstractCommandStream.isClosed()
returnstrue
) before this method has returned.- Overrides:
beforeNextCommand
in classAbstractCommandStream
- Throws:
IOException
- stream error while waiting for notification regarding next test required by forked jvm
-
isClosed
protected boolean isClosed()- Specified by:
isClosed
in classAbstractCommandStream
-
provideNewTest
public void provideNewTest()Signal that a new test is to be provided. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-