/** * Schedule process. Try to perform -getStatus using valid -start parameter but invalid process * name. Attempt should fail with an appropriate status code. * * @throws Exception */ @Test(groups = {"singleCluster"}) public void testProcessInstanceStatusInvalidName() throws Exception { bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T02:30Z"); bundles[0].setProcessPeriodicity(5, TimeUnit.minutes); bundles[0].submitFeedsScheduleProcess(prism); InstancesResult r = prism .getProcessHelper() .getProcessInstanceStatus("invalidProcess", "?start=2010-01-01T01:00Z"); if (!(r.getStatusCode() == ResponseKeys.PROCESS_NOT_FOUND)) { Assert.assertTrue(false); } }
/** * Schedule and then delete process. Try to get the status of its instances. Attempt should fail * with an appropriate code. * * @throws Exception */ @Test(groups = {"singleCluster"}) public void testProcessInstanceStatusKilled() throws Exception { bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:22Z"); bundles[0].setProcessPeriodicity(5, TimeUnit.minutes); bundles[0].submitFeedsScheduleProcess(prism); AssertUtil.assertSucceeded( prism.getProcessHelper().delete(URLS.DELETE_URL, bundles[0].getProcessData())); InstancesResult r = prism .getProcessHelper() .getProcessInstanceStatus( Util.readEntityName(bundles[0].getProcessData()), "?start=2010-01-02T01:00Z&end=2010-01-02T01:20Z"); if ((r.getStatusCode() != ResponseKeys.PROCESS_NOT_FOUND)) { Assert.assertTrue(false); } }