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 void
runAsync(int numberOfThreadsPerRunnable, TestLogger testLogger, Runnable... actions)
static void
runAsyncAndFailOnException(int numberOfThreadsPerRunnable, Runnable... actions)
static boolean
runSystemGC(long waitGCTimeMillis)
static Set<Thread>
startThreadsAsync(int numberOfThreadsPerRunnable, Runnable... actions)
static void
threadDump()
static void
waitFor(Collection<Thread> threads, TestLogger testLogger)
static void
waitFor(Condition condition, long timeLimitMsec)
static void
writeTextToFile(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)
-
-