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.Latchprivate final TestEnvironment(package private) final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcomplete()voidexpectCompletion(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.voidexpectNone(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 allelementsnumber 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
-
expectNone
- Throws:
InterruptedException
-
expectError(Class, long, long, String).