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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidprotected voidPossibly waiting for next command (seeAbstractCommandStream.nextCommand()) unless the stream is atomically closed (seeAbstractCommandStream.isClosed()returnstrue) before this method has returned.voidclose()protected booleanisClosed()protected Commandvoidnoop()voidSignal that a new test is to be provided.voidvoidSends an event to a fork jvm in order to skip tests.(package private) voidFor testing purposes.Methods inherited from class org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandStream
canContinue, invalidateInternalBuffer, readMethods inherited from class org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractForkInputStream
setFlushReceiverProvider, tryFlushMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
barrier
-
commands
-
closed
-
testClassNames
-
-
Constructor Details
-
TestProvidingInputStream
C'tor- Parameters:
testClassNames- source of the tests to be read from this stream
-
-
Method Details
-
testSetFinished
void testSetFinished()For testing purposes. -
skipSinceNextTest
public void skipSinceNextTest()Description copied from interface:NotifiableTestStreamSends an event to a fork jvm in order to skip tests. Returns immediately without blocking. -
shutdown
-
noop
public void noop() -
acknowledgeByeEventReceived
public void acknowledgeByeEventReceived() -
nextCommand
- Specified by:
nextCommandin classAbstractCommandStream
-
beforeNextCommand
Description copied from class:AbstractCommandStreamPossibly waiting for next command (seeAbstractCommandStream.nextCommand()) unless the stream is atomically closed (seeAbstractCommandStream.isClosed()returnstrue) before this method has returned.- Overrides:
beforeNextCommandin classAbstractCommandStream- Throws:
IOException- stream error while waiting for notification regarding next test required by forked jvm
-
isClosed
protected boolean isClosed()- Specified by:
isClosedin classAbstractCommandStream
-
provideNewTest
public void provideNewTest()Signal that a new test is to be provided. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
awaitNextTest
- Throws:
IOException
-