Package org.apache.hive.ptest.execution

Examples of org.apache.hive.ptest.execution.LogDirectoryCleaner


      Test test = null;
      PrintStream logStream = null;
      Logger logger = null;
      try {
        // start a log cleaner at the start of each test
        LogDirectoryCleaner cleaner = new LogDirectoryCleaner(new File(mExecutionContextConfiguration.
            getGlobalLogDirectory()), mExecutionContextConfiguration.getMaxLogDirectoriesPerProfile());
        cleaner.setName("LogCleaner-" + mExecutionContextConfiguration.
            getGlobalLogDirectory());
        cleaner.setDaemon(true);
        cleaner.start();
        test = mTestQueue.poll(30, TimeUnit.MINUTES);
        if(!execute) {
          terminateExecutionContext();
          break;
        }
View Full Code Here


      Test test = null;
      PrintStream logStream = null;
      Logger logger = null;
      try {
        // start a log cleaner at the start of each test
        LogDirectoryCleaner cleaner = new LogDirectoryCleaner(new File(mExecutionContextConfiguration.
            getGlobalLogDirectory()), mExecutionContextConfiguration.getMaxLogDirectoriesPerProfile());
        cleaner.setName("LogCleaner-" + mExecutionContextConfiguration.
            getGlobalLogDirectory());
        cleaner.setDaemon(true);
        cleaner.start();
        test = mTestQueue.poll(30, TimeUnit.MINUTES);
        if(!execute) {
          terminateExecutionContext();
          break;
        }
View Full Code Here

  public TemporaryFolder baseDir = new TemporaryFolder();

  @org.junit.Test
  public void testClean() throws Exception {
    File dir = create("a-0", "a-1", "a-2", "malformed", "b-0", "c-0", "c-5");
    LogDirectoryCleaner cleaner = new LogDirectoryCleaner(dir, 1);
    cleaner.run();
    List<String> remaining = Lists.newArrayList(dir.list());
    Collections.sort(remaining);
    Assert.assertEquals(Lists.newArrayList("a-1", "a-2", "b-0", "c-5", "malformed"),  remaining);
  }
View Full Code Here

TOP

Related Classes of org.apache.hive.ptest.execution.LogDirectoryCleaner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.