|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.junit.rules.Timeout.Builder
public static class Timeout.Builder
Builder for Timeout.
| Constructor Summary | |
|---|---|
protected |
Timeout.Builder()
|
| Method Summary | |
|---|---|
Timeout |
build()
Builds a Timeout instance using the values in this builder., |
protected boolean |
getLookingForStuckThread()
|
protected long |
getTimeout()
|
protected TimeUnit |
getTimeUnit()
|
Timeout.Builder |
withLookingForStuckThread(boolean enable)
Specifies whether to look for a stuck thread. |
Timeout.Builder |
withTimeout(long timeout,
TimeUnit unit)
Specifies the time to wait before timing out the test. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Timeout.Builder()
| Method Detail |
|---|
public Timeout.Builder withTimeout(long timeout,
TimeUnit unit)
If this is not called, or is called with a
timeout of 0, the returned Timeout
rule instance will cause the tests to wait forever to
complete, however the tests will still launch from a
separate thread. This can be useful for disabling timeouts
in environments where they are dynamically set based on
some property.
timeout - the maximum time to waitunit - the time unit of the timeout argument
this for method chaining.protected long getTimeout()
protected TimeUnit getTimeUnit()
public Timeout.Builder withLookingForStuckThread(boolean enable)
enable - true to enable the feature
this for method chaining.protected boolean getLookingForStuckThread()
public Timeout build()
Timeout instance using the values in this builder.,
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||