Exemplo n.º 1
0
 @Test
 public void testSubQuery_maxFetch() {
   String query = "ServiceInstance[ not @runsOn =& Compute{@_oid} ]{*}";
   QueryContext qc = newQueryContext(raptorContext);
   qc.setMaxFetch(1);
   try {
     queryService.query(query, qc);
     Assert.fail();
   } catch (QueryExecuteException qe) {
     // expected
     Assert.assertEquals(QueryErrCodeEnum.INCOMPLETE_JOIN_QUERY.getErrorCode(), qe.getErrorCode());
   }
 }
Exemplo n.º 2
0
 @Test
 public void testSub06Projection_endReference() {
   // sub query on non-
   String query =
       "Environment[@_status =& ApplicationService{*}.(services[@name=~\"srp-app.*\"] && updateStrategies[@name=\"1-100\"])]";
   try {
     queryService.query(query, raptorContext);
     Assert.fail();
   } catch (QueryExecuteException qee) {
     // expected
     Assert.assertEquals(QueryErrCodeEnum.IILEGAL_PROJECTION.getErrorCode(), qee.getErrorCode());
   }
 }