public class TestRuleLimitSysouts
extends com.carrotsearch.randomizedtesting.rules.TestRuleAdapter
System.out
or System.err
,
unless the condition is not enforced (see isEnforced()
).Modifier and Type | Class and Description |
---|---|
static interface |
TestRuleLimitSysouts.Limit
An annotation specifying the limit of bytes per class.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SYSOUT_BYTES_THRESHOLD
Max limit of bytes printed to either
System.out or System.err . |
Constructor and Description |
---|
TestRuleLimitSysouts(TestRuleMarkFailure failureMarker) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterAlways(List<Throwable> errors) |
protected void |
afterIfSuccessful()
We're only interested in failing the suite if it was successful (otherwise
just propagate the original problem and don't bother doing anything else).
|
protected void |
before() |
static void |
checkCaptureStreams()
Ensures
System.out and System.err point to delegate streams. |
protected boolean |
isEnforced() |
public static final int DEFAULT_SYSOUT_BYTES_THRESHOLD
System.out
or System.err
.
This limit is enforced per-class (suite).public TestRuleLimitSysouts(TestRuleMarkFailure failureMarker)
protected void before() throws Throwable
before
in class com.carrotsearch.randomizedtesting.rules.TestRuleAdapter
Throwable
public static void checkCaptureStreams()
System.out
and System.err
point to delegate streams.protected boolean isEnforced()
protected void afterIfSuccessful() throws Throwable
afterIfSuccessful
in class com.carrotsearch.randomizedtesting.rules.TestRuleAdapter
Throwable
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.