mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
28.16.2018 62b938d31692414f86c8f306b855e2f3bc7cf536
borgbutler-core/src/test/java/de/micromata/borgbutler/jobs/TestJob.java
@@ -7,8 +7,9 @@
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
public class TestJob extends AbstractJob {
public class TestJob extends AbstractJob<String> {
    private Logger log = LoggerFactory.getLogger(TestJob.class);
    private int time;
    private File counterScript;
@@ -30,7 +31,7 @@
    }
    @Override
    public void execute() {
    public String execute() {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        ByteArrayOutputStream errorOutputStream = new ByteArrayOutputStream();
        CommandLine cmdLine = new CommandLine(counterScript.getAbsolutePath());
@@ -72,7 +73,7 @@
                log.error("Error while executing script: " + ex.getMessage(), ex);
            }
        }
        //log.info(outputStream.toString(Charset.forName("UTF-8")));
        return outputStream.toString(Charset.forName("UTF-8"));
        //log.error(errorOutputStream.toString(Charset.forName("UTF-8")));
    }
}