Class TestLessInputStream
java.lang.Object
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandReader
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.DefaultCommandReader
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,NotifiableTestStream,CommandReader
Dispatches commands without tests.
- Since:
- 2.19
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuildsstreams, registers cachable commands and provides accessible API to dispatch immediate commands to all atomically alive streams. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Semaphoreprivate final TestLessInputStream.TestLessInputStreamBuilderprivate final AtomicBoolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) intFor testing purposes only.private voidprotected voidPossibly waiting for next command (seeDefaultCommandReader.nextCommand()) unless the stream is atomically closed (seeCommandReader.isClosed()returnstrue) before this method has returned.voidclose()booleanisClosed()protected Commandvoidnoop()voidForked jvm notifies master process to provide a new test.voidvoidSends an event to a fork jvm in order to skip tests.Methods inherited from class org.apache.maven.plugin.surefire.booterclient.lazytestprovider.DefaultCommandReader
canContinue, readNextCommand
-
Field Details
-
barrier
-
closed
-
immediateCommands
-
builder
-
cachableCommands
-
-
Constructor Details
-
TestLessInputStream
-
-
Method Details
-
provideNewTest
public void provideNewTest()Description copied from interface:NotifiableTestStreamForked jvm notifies master process to provide a new test.
NotifiesTestProvidingInputStreamin order to dispatch a new test back to the forked jvm (particular fork which hits this call); or do nothing inTestLessInputStream. -
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() -
isClosed
public boolean isClosed() -
nextCommand
- Specified by:
nextCommandin classDefaultCommandReader
-
beforeNextCommand
Description copied from class:DefaultCommandReaderPossibly waiting for next command (seeDefaultCommandReader.nextCommand()) unless the stream is atomically closed (seeCommandReader.isClosed()returnstrue) before this method has returned.- Overrides:
beforeNextCommandin classDefaultCommandReader- Throws:
IOException- stream error while waiting for notification regarding next test required by forked jvm
-
close
public void close() -
availablePermits
int availablePermits()For testing purposes only.- Returns:
- permits used internally by
beforeNextCommand()
-
awaitNextCommand
- Throws:
IOException
-