Exemple #1
0
 /** Clean up method. */
 @After
 public void cleanUp() {
   try {
     testSession.close();
     adminSession.execute(new DropDB(RENAMED));
     adminSession.execute(new DropDB(NAME));
     adminSession.close();
     // give the server some time to clean up the sessions before next test
     Performance.sleep(100);
   } catch (final Exception ex) {
     fail(Util.message(ex));
   }
 }
  @AfterClass
  public static void tearDownAfterClass() throws Exception {
    final Transaction transaction = session.getTransaction();

    if (transaction.isActive()) transaction.commit();

    if (session != null) session.close();
  }
Exemple #3
0
 /** Stops a session. */
 @After
 public final void stopSession() {
   try {
     if (cleanup) session.execute(new DropDB(NAME));
     session.close();
   } catch (final IOException ex) {
     fail(Util.message(ex));
   }
 }