Commit 2f3249de authored by Stein Eldar Johnsen's avatar Stein Eldar Johnsen 💬

Testing cleanup (IntereationExec) and docs.

parent 522b3e44
Pipeline #30650000 passed with stages
in 1 minute and 26 seconds
...@@ -65,10 +65,6 @@ public class IntegrationExecutor { ...@@ -65,10 +65,6 @@ public class IntegrationExecutor {
return executor.getError(); return executor.getError();
} }
public void setDirectory(File directory) {
this.directory = directory;
}
/** /**
* Set input stream to write to the process as program input. * Set input stream to write to the process as program input.
* *
...@@ -89,6 +85,15 @@ public class IntegrationExecutor { ...@@ -89,6 +85,15 @@ public class IntegrationExecutor {
this.deadlineMs = deadlineMs; this.deadlineMs = deadlineMs;
} }
/**
* Set the working directory for the execution.
*
* @param directory The CWD for the executiron.
*/
public void setDirectory(File directory) {
this.directory = directory;
}
/** /**
* Run the program with the specified arguments. * Run the program with the specified arguments.
* *
......
...@@ -13,7 +13,6 @@ import java.io.FileOutputStream; ...@@ -13,7 +13,6 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.Clock; import java.time.Clock;
import java.util.concurrent.ExecutorService;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
...@@ -28,8 +27,6 @@ import static org.junit.Assert.fail; ...@@ -28,8 +27,6 @@ import static org.junit.Assert.fail;
public class IntegrationExecutorTest { public class IntegrationExecutorTest {
@Rule @Rule
public TemporaryFolder temporaryFolder; public TemporaryFolder temporaryFolder;
private Runtime runtime;
private ExecutorService executor;
private File integration; private File integration;
@Before @Before
...@@ -79,7 +76,7 @@ public class IntegrationExecutorTest { ...@@ -79,7 +76,7 @@ public class IntegrationExecutorTest {
} }
@Test @Test
public void testRun_deadlineExceeded() throws IOException { public void testRun_deadlineExceeded() {
IntegrationExecutor sut = new IntegrationExecutor(integration); IntegrationExecutor sut = new IntegrationExecutor(integration);
sut.setDeadlineMs(100); sut.setDeadlineMs(100);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment