public class TestRuleLimitSysouts
extends com.carrotsearch.randomizedtesting.rules.TestRuleAdapter
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 long |
DEFAULT_HARD_LIMIT
Max hard limit of sysout bytes.
|
static long |
DEFAULT_LIMIT
Max limit of bytes printed to either
System.out or System.err . |
static int |
MAX_LIMIT
Maximum limit allowed for
TestRuleLimitSysouts.Limit.bytes() before sysout check suppression
is suggested. |
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 long DEFAULT_LIMIT
System.out
or System.err
.
This limit is enforced per-class (suite).public static final long DEFAULT_HARD_LIMIT
public static final int MAX_LIMIT
TestRuleLimitSysouts.Limit.bytes()
before sysout check suppression
is suggested.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-2021 Apache Software Foundation. All Rights Reserved.