diff options
Diffstat (limited to 'src/main/java/org/junit/rules/Timeout.java')
-rw-r--r-- | src/main/java/org/junit/rules/Timeout.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/main/java/org/junit/rules/Timeout.java b/src/main/java/org/junit/rules/Timeout.java index 334a923..5cf905a 100644 --- a/src/main/java/org/junit/rules/Timeout.java +++ b/src/main/java/org/junit/rules/Timeout.java @@ -40,7 +40,6 @@ import java.util.concurrent.TimeUnit; public class Timeout implements TestRule { private final long timeout; private final TimeUnit timeUnit; - private final boolean lookForStuckThread; /** * Returns a new builder for building an instance. @@ -80,7 +79,6 @@ public class Timeout implements TestRule { public Timeout(long timeout, TimeUnit timeUnit) { this.timeout = timeout; this.timeUnit = timeUnit; - lookForStuckThread = false; } /** @@ -92,7 +90,6 @@ public class Timeout implements TestRule { protected Timeout(Builder builder) { timeout = builder.getTimeout(); timeUnit = builder.getTimeUnit(); - lookForStuckThread = builder.getLookingForStuckThread(); } /** @@ -125,16 +122,6 @@ public class Timeout implements TestRule { } /** - * Gets whether this {@code Timeout} will look for a stuck thread - * when the test times out. - * - * @since 4.12 - */ - protected final boolean getLookingForStuckThread() { - return lookForStuckThread; - } - - /** * Creates a {@link Statement} that will run the given * {@code statement}, and timeout the operation based * on the values configured in this rule. Subclasses @@ -146,7 +133,6 @@ public class Timeout implements TestRule { Statement statement) throws Exception { return FailOnTimeout.builder() .withTimeout(timeout, timeUnit) - .withLookingForStuckThread(lookForStuckThread) .build(statement); } @@ -205,25 +191,6 @@ public class Timeout implements TestRule { } /** - * Specifies whether to look for a stuck thread. If a timeout occurs and this - * feature is enabled, the rule will look for a thread that appears to be stuck - * and dump its backtrace. This feature is experimental. Behavior may change - * after the 4.12 release in response to feedback. - * - * @param enable {@code true} to enable the feature - * @return {@code this} for method chaining. - */ - public Builder withLookingForStuckThread(boolean enable) { - this.lookForStuckThread = enable; - return this; - } - - protected boolean getLookingForStuckThread() { - return lookForStuckThread; - } - - - /** * Builds a {@link Timeout} instance using the values in this builder., */ public Timeout build() { |