/** tries to update feed with invalid el exp */
 @Test(groups = {"singleCluster"})
 public void testDryRunFailureUpdateFeed() throws Exception {
   bundles[0].submitClusters(prism);
   String feed = bundles[0].getInputFeedFromBundle();
   ServiceResponse response =
       prism.getFeedHelper().submitAndSchedule(Util.URLS.SUBMIT_AND_SCHEDULE_URL, feed);
   AssertUtil.assertSucceeded(response);
   feed = Util.setFeedProperty(feed, "EntityDryRunTestProp", "${coord:someEL(1)");
   response = prism.getFeedHelper().update(feed, feed);
   validate(response);
   Assert.assertEquals(
       OozieUtil.getNumberOfBundle(cluster, EntityType.FEED, Util.readEntityName(feed)),
       1,
       "more than one bundle found after failed update request");
 }
Beispiel #2
0
 /** tries to update process with invalid EL exp. */
 @Test(groups = {"singleCluster"})
 public void testDryRunFailureUpdateProcess() throws Exception {
   bundles[0].setProcessValidity(
       TimeUtil.getTimeWrtSystemTime(-10), TimeUtil.getTimeWrtSystemTime(100));
   bundles[0].submitAndScheduleProcess();
   bundles[0].setProcessProperty("EntityDryRunTestProp", "${coord:someEL(1)");
   ServiceResponse response =
       prism.getProcessHelper().update(bundles[0].getProcessData(), bundles[0].getProcessData());
   validate(
       response,
       "The new entity (process) " + bundles[0].getProcessName() + " can't be scheduled");
   Assert.assertEquals(
       OozieUtil.getNumberOfBundle(clusterOC, EntityType.PROCESS, bundles[0].getProcessName()),
       1,
       "more than one bundle found after failed update request");
 }
Beispiel #3
0
 /** tries to update feed with invalid el exp. */
 @Test(groups = {"singleCluster"})
 public void testDryRunFailureUpdateFeed() throws Exception {
   bundles[0].submitClusters(prism);
   FeedMerlin feed = new FeedMerlin(bundles[0].getInputFeedFromBundle());
   ServiceResponse response = prism.getFeedHelper().submitAndSchedule(feed.toString());
   AssertUtil.assertSucceeded(response);
   feed.withProperty("EntityDryRunTestProp", "${coord:someEL(1)");
   response = prism.getFeedHelper().update(feed.toString(), feed.toString());
   validate(
       response,
       "The new entity (feed) " + bundles[0].getInputFeedNameFromBundle() + " can't be scheduled");
   Assert.assertEquals(
       OozieUtil.getNumberOfBundle(clusterOC, EntityType.FEED, feed.getName()),
       1,
       "more than one bundle found after failed update request");
 }