final public Update Drop() throws ParseException { boolean silent = false ; Target target ; jj_consume_token(DROP); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SILENT: jj_consume_token(SILENT); silent = true ; break; default: jj_la1[43] = jj_gen; ; } target = GraphRefAll(); {if (true) return new UpdateDrop(target, silent) ;} throw new Error("Missing return statement in function"); }
final public Update Drop() throws ParseException { boolean silent = false ; Target target ; jj_consume_token(DROP); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SILENT: jj_consume_token(SILENT); silent = true ; break; default: jj_la1[47] = jj_gen; ; } target = GraphRefAll(); {if (true) return new UpdateDrop(target, silent) ;} throw new Error("Missing return statement in function"); }
/*package*/ static void resetServer() { if (countServer.get() == 0) throw new RuntimeException("No server started!"); if ( CLEAR_DSG_DIRECTLY ) { Txn.executeWrite(dsgTesting, ()->dsgTesting.clear()) ; } else { Update clearRequest = new UpdateDrop(Target.ALL) ; UpdateProcessor proc = UpdateExecutionFactory.createRemote(clearRequest, serviceUpdate()) ; try {proc.execute() ; } catch (Throwable e) {e.printStackTrace(); throw e;} } }
/*package*/ static void resetServer() { if (countServer.get() == 0) throw new RuntimeException("No server started!"); if ( CLEAR_DSG_DIRECTLY ) { Txn.executeWrite(dsgTesting, ()->dsgTesting.clear()) ; } else { Update clearRequest = new UpdateDrop(Target.ALL) ; UpdateProcessor proc = UpdateExecutionFactory.createRemote(clearRequest, serviceUpdate()) ; try {proc.execute() ; } catch (Throwable e) {e.printStackTrace(); throw e;} } }
/*package*/ static void resetServer() { if (countServer.get() == 0) throw new RuntimeException("No server started!"); if ( CLEAR_DSG_DIRECTLY ) { Txn.executeWrite(dsgTesting, ()->dsgTesting.clear()) ; } else { Update clearRequest = new UpdateDrop(Target.ALL) ; UpdateProcessor proc = UpdateExecutionFactory.createRemote(clearRequest, serviceUpdate()) ; try {proc.execute() ; } catch (Throwable e) {e.printStackTrace(); throw e;} } }
/** * Clean up after each test by resetting the Fuseki instance */ @After public void cleanupTest() { Update clearRequest = new UpdateDrop(Target.ALL) ; UpdateProcessor proc = UpdateExecutionFactory.createRemote(clearRequest, FusekiTestAuth.serviceUpdate(), client) ; proc.execute() ; }
@Test public void testCreateDrop2() { DatasetGraph gStore = getEmptyDatasetGraph() ; Update u = new UpdateCreate(graphIRI) ; UpdateAction.execute(u, gStore) ; u = new UpdateCreate(graphIRI, true) ; UpdateAction.execute(u, gStore) ; // JENA-1068 // assertTrue(gStore.containsGraph(graphIRI)) ; assertTrue(graphEmpty(gStore.getGraph(graphIRI))) ; u = new UpdateDrop(graphIRI) ; UpdateAction.execute(u, gStore) ; assertFalse(gStore.containsGraph(graphIRI)) ; u = new UpdateDrop(graphIRI, true) ; UpdateAction.execute(u, gStore) ; }
u = new UpdateDrop(graphIRI) ; UpdateAction.execute(u, gStore) ; assertFalse(gStore.containsGraph(graphIRI)) ;