Class DiskUsageTestUtil
- java.lang.Object
-
- jetbrains.buildServer.serverSide.statistics.diskusage.DiskUsageTestUtil
-
public class DiskUsageTestUtil extends Object
Created 02.04.13 13:07- Author:
- Eugene Petrenko (eugene.petrenko@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description DiskUsageTestUtil(BuildServerCreator fixture, boolean createListener, boolean listenerWithBuildFinish)
-
Method Summary
-
-
-
Constructor Detail
-
DiskUsageTestUtil
public DiskUsageTestUtil(@NotNull BuildServerCreator fixture, boolean createListener, boolean listenerWithBuildFinish)
-
-
Method Detail
-
full
public static DiskUsageTestUtil full(@NotNull BuildServerCreator fixture)
-
noListener
public static DiskUsageTestUtil noListener(@NotNull BuildServerCreator fixture)
-
listenerWithoutBuildFinished
public static DiskUsageTestUtil listenerWithoutBuildFinished(@NotNull BuildServerCreator fixture)
-
enableDiskUsageListener
public void enableDiskUsageListener(@NotNull BuildServerCreator fixture, boolean listenerWithBuildFinish)
-
getDiskUsageTaskExecutor
public DiskUsageTaskExecutor getDiskUsageTaskExecutor()
-
getDiskUsage
public DiskUsage getDiskUsage()
-
getDiskUsageStoreProvider
public DiskUsageStoreProviderImpl getDiskUsageStoreProvider()
-
getFileSystemFacade
public FileSystemFacade getFileSystemFacade()
-
getDiskUsageSListener
public DiskUsageSListener getDiskUsageSListener()
-
getDiskUsageCache
public InMemoryProjectDiskUsageImpl getDiskUsageCache()
-
getCleanupListener
@Nullable public FileCleanListener getCleanupListener()
-
getLogsSize
public static long getLogsSize(@NotNull SBuild build)
-
getArtifactsSize
public static long getArtifactsSize(@NotNull SBuild build)
-
removeBuild
public void removeBuild(@NotNull SBuild build, int cleanedArtifacts)
-
createBuild
public SFinishedBuild createBuild(SBuildType bt, int size) throws Exception
- Throws:
Exception
-
createExternalArtifact
public long createExternalArtifact(@NotNull SBuild build, int size, @NotNull String storageId) throws Exception
- Throws:
Exception
-
createExternalArtifact
public long createExternalArtifact(@NotNull SBuild build, int size, @NotNull String name, @NotNull String storageId) throws IOException
- Throws:
IOException
-
createArtifact
public long createArtifact(@NotNull SBuild build, int size, @NotNull String name, @NotNull String storageId, boolean isExternal) throws Exception
- Throws:
Exception
-
createArtifact
public static long createArtifact(@NotNull SBuild build, int size) throws Exception
- Throws:
Exception
-
createArtifact
public static long createArtifact(@NotNull SBuild build, String filename, int size) throws Exception
- Throws:
Exception
-
deleteArtifact
public static void deleteArtifact(@NotNull SBuild build) throws Exception
- Throws:
Exception
-
deleteArtifact
public static void deleteArtifact(@NotNull SBuild... builds) throws Exception
- Throws:
Exception
-
waitFor
public static <T> T waitFor(Supplier<T> supplier, BiFunction<T,T,Boolean> condition, BiFunction<T,T,String> describe, T expected, long timeoutMS) throws InterruptedException
- Throws:
InterruptedException
-
waitFor
public static <T> T waitFor(Supplier<T> supplier, Function<T,Boolean> condition, Function<T,String> describe, long timeoutMS) throws InterruptedException
- Throws:
InterruptedException
-
waitFor
public static <T> void waitFor(Supplier<T> supplier, T expected, long timeoutMS) throws InterruptedException
- Throws:
InterruptedException
-
-