Package org.reactivestreams.tck
Class TestEnvironment.Receptacle<T>
java.lang.Object
org.reactivestreams.tck.TestEnvironment.Receptacle<T>
- Enclosing class:
TestEnvironment
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayBlockingQueue
<Optional<T>> private final TestEnvironment.Latch
private final TestEnvironment
(package private) final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
complete()
void
expectCompletion
(long timeoutMillis, String errorMsg) (package private) final <E extends Throwable>
EexpectError
(Class<E> clazz, long totalTimeoutMillis, long pollTimeoutMillis, String errorMsg) <E extends Throwable>
EexpectError
(Class<E> clazz, long timeoutMillis, String errorMsg) Deprecated.void
expectNone
(long withinMillis, String errorMsgPrefix) nextOrEndOfStream
(long timeoutMillis, String errorMsg)
-
Field Details
-
QUEUE_SIZE
final int QUEUE_SIZE- See Also:
-
env
-
abq
-
completedLatch
-
-
Constructor Details
-
Receptacle
Receptacle(TestEnvironment env)
-
-
Method Details
-
add
-
complete
public void complete() -
next
- Throws:
InterruptedException
-
nextOrEndOfStream
public Optional<T> nextOrEndOfStream(long timeoutMillis, String errorMsg) throws InterruptedException - Throws:
InterruptedException
-
nextN
public List<T> nextN(long elements, long timeoutMillis, String errorMsg) throws InterruptedException - Parameters:
timeoutMillis
- total timeout time for awaiting allelements
number of elements- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectError
@Deprecated public <E extends Throwable> E expectError(Class<E> clazz, long timeoutMillis, String errorMsg) throws Exception Deprecated.Deprecated in favor ofexpectError(Class, long, long, String)
.- Throws:
Exception
-
expectError
final <E extends Throwable> E expectError(Class<E> clazz, long totalTimeoutMillis, long pollTimeoutMillis, String errorMsg) throws Exception - Throws:
Exception
-
expectNone
- Throws:
InterruptedException
-
expectError(Class, long, long, String)
.