Package org.jboss.resteasy.utils
Class TimeoutUtil
- java.lang.Object
-
- org.jboss.resteasy.utils.TimeoutUtil
-
public class TimeoutUtil extends Object
This class is copied from shared module of wildfly-core testsuite.Adjusts default timeouts according to the system property.
All tests influenced by machine slowness should employ this util.
- Author:
- Ondrej Zizka, Radoslav Husar, Jan Lanik
-
-
Field Summary
Fields Modifier and Type Field Description static StringFACTOR_SYS_PROP
-
Constructor Summary
Constructors Constructor Description TimeoutUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intadjust(int amount)Adjusts timeout for operations.static doublegetFactor()Get timeout factor to multiply by.static intgetRawFactor()Get raw timeout factor.
-
-
-
Field Detail
-
FACTOR_SYS_PROP
public static final String FACTOR_SYS_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
adjust
public static int adjust(int amount)
Adjusts timeout for operations.- Returns:
- given timeout adjusted by ratio from system property "ts.timeout.factor"
-
getFactor
public static double getFactor()
Get timeout factor to multiply by.- Returns:
- double factor value
-
getRawFactor
public static int getRawFactor()
Get raw timeout factor.- Returns:
- value of parsed system property "ts.timeout.factor"
-
-