Ejemplo n.º 1
0
  @AfterClass
  public static void tearDown() throws Exception {
    AsterixHyracksIntegrationUtil.deinit();
    File outdir = new File(PATH_ACTUAL);
    File[] files = outdir.listFiles();
    if (files == null || files.length == 0) {
      outdir.delete();
    }

    // clean up the files written by the ASTERIX storage manager
    for (String d : AsterixHyracksIntegrationUtil.getDataDirs()) {
      TestsUtils.deleteRec(new File(d));
    }
  }
Ejemplo n.º 2
0
 private static void deleteTransactionLogs() throws Exception {
   for (String ncId : AsterixHyracksIntegrationUtil.getNcNames()) {
     File log = new File(txnProperties.getLogDirectory(ncId));
     if (log.exists()) {
       FileUtils.deleteDirectory(log);
     }
   }
 }
Ejemplo n.º 3
0
  @BeforeClass
  public static void setUp() throws Exception {
    System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, TEST_CONFIG_FILE_NAME);
    File outdir = new File(PATH_ACTUAL);
    outdir.mkdirs();

    AsterixPropertiesAccessor apa = new AsterixPropertiesAccessor();
    txnProperties = new AsterixTransactionProperties(apa);

    deleteTransactionLogs();

    AsterixHyracksIntegrationUtil.init();
  }