Package jetbrains.buildServer
Class TeamCityTestUtils
- java.lang.Object
-
- jetbrains.buildServer.TeamCityTestUtils
-
public final class TeamCityTestUtils extends Object
Useful static methods for testing, but not asserts.- Author:
- Leonid Bushuev from JetBrains
-
-
Constructor Summary
Constructors Constructor Description TeamCityTestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidrunAsync(int numberOfThreadsPerRunnable, TestLogger testLogger, Runnable... actions)static voidrunAsyncAndFailOnException(int numberOfThreadsPerRunnable, Runnable... actions)static booleanrunSystemGC(long waitGCTimeMillis)static Set<Thread>startThreadsAsync(int numberOfThreadsPerRunnable, Runnable... actions)static voidthreadDump()static voidwaitFor(Collection<Thread> threads, TestLogger testLogger)static voidwaitFor(Condition condition, long timeLimitMsec)static voidwriteTextToFile(File file, String text)
-
-
-
Method Detail
-
runAsyncAndFailOnException
public static void runAsyncAndFailOnException(int numberOfThreadsPerRunnable, Runnable... actions) throws InterruptedException- Throws:
InterruptedException
-
runAsync
public static void runAsync(int numberOfThreadsPerRunnable, @Nullable TestLogger testLogger, Runnable... actions) throws InterruptedException- Throws:
InterruptedException
-
waitFor
public static void waitFor(@NotNull Collection<Thread> threads, @Nullable TestLogger testLogger)
-
waitFor
public static void waitFor(@NotNull Condition condition, long timeLimitMsec)
-
startThreadsAsync
public static Set<Thread> startThreadsAsync(int numberOfThreadsPerRunnable, Runnable... actions) throws InterruptedException
- Throws:
InterruptedException
-
threadDump
public static void threadDump()
-
writeTextToFile
public static void writeTextToFile(@NotNull File file, @NotNull String text) throws RuntimeException- Throws:
RuntimeException
-
runSystemGC
public static boolean runSystemGC(long waitGCTimeMillis)
-
-