@Test public void testMultipleManualInstances() throws Exception { TaskScheduleUtil.waitForAllTasksToStop(); getEventInspectorsUtil().waitForCalmPeriod(); createSnapshotTask("Nexus1650Task1"); createSnapshotTask("Nexus1650Task2"); createSnapshotTask("Nexus1650Task3"); List<ScheduledServiceListResource> tasks = TaskScheduleUtil.getTasks(); assertThat(tasks, hasSize(3)); long startTimestamp = System.currentTimeMillis(); for (ScheduledServiceListResource resource : tasks) { TaskScheduleUtil.run(resource.getId()); } waitForOneTaskSleeping(); TaskScheduleUtil.waitForAllTasksToStop(); assertAllTasksWereRunning(startTimestamp); }
@Test public void test() throws Exception { final File nexusDir = new File(nexusWorkDir + "/storage/nxcm0670"); final File remoteDir = new File(localStorageDir + "/nxcm0670"); TaskScheduleUtil.run("1"); TaskScheduleUtil.waitForAllTasksToStop(); assertThat(new File(nexusDir, "plugins/com.sonatype.nexus.p2.its.bundle_1.0.0.jar"), exists()); copyFile(new File(remoteDir, "site-empty.xml"), new File(remoteDir, "site.xml")); TaskScheduleUtil.run("1"); TaskScheduleUtil.waitForAllTasksToStop(); assertThat( new File(nexusDir, "plugins/com.sonatype.nexus.p2.its.bundle_1.0.0.jar"), not(exists())); }
@Test public void test() throws Exception { final File nexusDir = new File(nexusWorkDir, "storage/nxcm1381"); TaskScheduleUtil.run("1"); TaskScheduleUtil.waitForAllTasksToStop(); assertThat( new File(nexusDir, "features/com.sonatype.nexus.p2.its.feature_1.0.0.jar"), exists()); assertThat(new File(nexusDir, "plugins/com.sonatype.nexus.p2.its.bundle_1.0.0.jar"), exists()); }
@Test public void test() throws Exception { TaskScheduleUtil.run("1"); TaskScheduleUtil.waitForAllTasksToStop(); installAndVerifyP2Feature( "com.sonatype.nexus.p2.its.feature3.feature.group", new String[] {"com.sonatype.nexus.p2.its.feature3_1.0.0"}, new String[] { "com.sonatype.nexus.p2.its.bundle_1.0.0.jar", "com.sonatype.nexus.p2.its.bundle3_1.0.0.jar" }); }