j.jenkins.getPlugin(DiskUsagePlugin.class).getConfiguration().setCheckWorkspaceOnSlave(false);
}
@Test
public void getWorkspaceSizeTest() throws Exception{
RunListener listener = RunListener.all().get(DiskUsageBuildListener.class);
j.jenkins.getExtensionList(RunListener.class).remove(listener);
Slave slave1 = DiskUsageTestUtil.createSlave("slave1", new File(j.jenkins.getRootDir(),"workspace1").getPath(), j.jenkins, j.createComputerLauncher(null));
Slave slave2 = DiskUsageTestUtil.createSlave("slave2", new File(j.jenkins.getRootDir(),"workspace2").getPath(), j.jenkins, j.createComputerLauncher(null));
FreeStyleProject project = j.jenkins.createProject(FreeStyleProject.class, "project");
project.setAssignedLabel(slave1.getSelfLabel());