| Constructor and Description |
|---|
TestUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearAllStaticFieldsForUnitTest()
THIS IS FOR UNIT TESTS ONLY - DO NOT CALL THIS METHOD FROM USER CODE
|
static void |
randomizeLocale()
Set some system properties randomly after each test..
|
static void |
setShouldRandomizeTimezones(boolean theShouldRandomizeTimezones) |
static String |
stripReturns(String theString)
THIS IS FOR UNIT TESTS ONLY - DO NOT CALL THIS METHOD FROM USER CODE
|
static void |
waitForSize(int theTarget,
AtomicInteger theInteger)
THIS IS FOR UNIT TESTS ONLY - DO NOT CALL THIS METHOD FROM USER CODE
|
static void |
waitForSize(int theTarget,
Callable<Integer> theSource)
THIS IS FOR UNIT TESTS ONLY - DO NOT CALL THIS METHOD FROM USER CODE
|
public TestUtil()
public static void setShouldRandomizeTimezones(boolean theShouldRandomizeTimezones)
public static void clearAllStaticFieldsForUnitTest()
When we run the unit tests in cobertura, JUnit doesn't seem to clean up static fields which leads to tons of memory being used by the end and the JVM crashes in Travis. Manually clearing all of the static fields seems to solve this.
public static void randomizeLocale()
public static void waitForSize(int theTarget, AtomicInteger theInteger)
Wait for an atomicinteger to hit a given site and fail if it never does
public static void waitForSize(int theTarget, Callable<Integer> theSource) throws Exception
Wait for an atomicinteger to hit a given site and fail if it never does
Exceptionpublic static String stripReturns(String theString)
Strip \r chars from a string to account for line ending platform differences
Copyright © 2014–2019 University Health Network. All rights reserved.