Package io.servicetalk.test.resources
Class TestUtils
java.lang.Object
io.servicetalk.test.resources.TestUtils
Test utility methods / helpers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertNoAsyncErrors
(String message, Queue<? extends Throwable> errors) Helper method to check if a givenQueue
contains any errors, usually produced through async sources.static void
assertNoAsyncErrors
(Queue<? extends Throwable> errors) Helper method to check if a givenQueue
contains any errors, usually produced through async sources.static org.hamcrest.Matcher<Thread>
matchThreadNamePrefix
(String expectPrefix) Create aMatcher
that matches the thread's name against and expected prefix value.
-
Method Details
-
assertNoAsyncErrors
Helper method to check if a givenQueue
contains any errors, usually produced through async sources. For ALLThrowable
s found in the queue, a suppressed error will be captured and surface through a singleAssertionError
.- Parameters:
errors
- The queue of captured errors.
-
assertNoAsyncErrors
Helper method to check if a givenQueue
contains any errors, usually produced through async sources. For ALLThrowable
s found in the queue, a suppressed error will be captured and surface through a singleAssertionError
.- Parameters:
message
- message for the AssertionError.errors
- The queue of captured errors.
-
matchThreadNamePrefix
Create aMatcher
that matches the thread's name against and expected prefix value.- Parameters:
expectPrefix
- the expected prefix value to match.- Returns:
- a
Matcher
that matches the thread's name against and expected prefix value.
-