Ejemplo n.º 1
0
  @AfterClass
  public static void tearDownClass() throws IOException {
    if (database != null) {
      database.closeConnection();
    }

    if (started) {
      log.info("Stopping database procedure");

      assertEquals(Feedback.Neutral, proc.stop());
    }
  }
Ejemplo n.º 2
0
  @BeforeClass
  public static void setUpClass() throws IOException {
    DtVersionDetector.enforceInstallationType(InstallationType.Classic);

    config = EasyTravelConfig.read();
    proc = new DbmsProcedure(new DefaultProcedureMapping("databasetest"));
    started = false;

    LoggerFactory.initLogging();

    if (config.internalDatabaseEnabled) {
      assertTrue(proc.init());
      if (!proc.isRunning()) { // JLT-44297 don't start Derby twice
        log.info("Starting database procedure");

        started = true;
        assertEquals(Feedback.Success, proc.run());
      }
    }
    database = new SqlDatabase().initialize();

    //		JpaAccessUtils.setProperties(config.databaseDriver, config.databaseUrl, config.databaseUser,
    // config.databasePassword);
  }