Set<Thread> expectedState,
List<Throwable> errors,
LifecycleScope scope, Description description,
AnnotatedElement... annotationChain)
{
final ThreadLeakScope annScope = firstAnnotated(ThreadLeakScope.class, annotationChain);
// Return immediately if no checking.
if (annScope.value() == Scope.NONE)
return;
// If suite scope check is requested skip testing at test level.
if (annScope.value() == Scope.SUITE && scope == LifecycleScope.TEST) {
return;
}
// Check for the set of live threads, with optional lingering.
int lingerTime = firstAnnotated(ThreadLeakLingering.class, annotationChain).linger();