Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Add attempt to copy minicluster files
Browse files Browse the repository at this point in the history
  • Loading branch information
jvalkeal committed Nov 11, 2015
1 parent 7de86ab commit b48b2d1
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -21,12 +21,14 @@
import static org.junit.Assert.assertTrue;

import java.io.BufferedReader;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;

import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
Expand Down Expand Up @@ -93,6 +95,14 @@ public void testConfiguredConfigurationWithJobRun() throws Exception {
assertNull(reader.readLine());
reader.close();
} catch (Exception e) {
// attempt to copy minicluster files before
// those are cleaned
try {
FileUtils.copyDirectory(new File("target/HadoopClusterTests"),
new File("target/HadoopClusterTests-copy"));
} catch (Exception e2) {
log.error("Can't make copy of target/HadoopClusterTests", e2);
}
// printing info before failing test
try {
log.info("Job info: " + job);
Expand Down

0 comments on commit b48b2d1

Please sign in to comment.