public class StaticFieldsInvariantRule extends Object implements TestRule
TestRule that ensures static, reference fields of the suite class
(and optionally its superclasses) are cleaned up after a suite is completed.
This is helpful in finding out static memory leaks (a class references
something huge but is no longer used).ClassRule,
accept(Field)| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_LEAK_THRESHOLD |
| Constructor and Description |
|---|
StaticFieldsInvariantRule()
By default use
DEFAULT_LEAK_THRESHOLD as the threshold and count
in superclasses. |
StaticFieldsInvariantRule(long leakThresholdBytes,
boolean countSuperclasses) |
public static final long DEFAULT_LEAK_THRESHOLD
public StaticFieldsInvariantRule()
DEFAULT_LEAK_THRESHOLD as the threshold and count
in superclasses.public StaticFieldsInvariantRule(long leakThresholdBytes,
boolean countSuperclasses)
Copyright © 2011-2013 Carrot Search s.c.. All Rights Reserved.