Skip to content

Commit

Permalink
More verbose error logging for FitClientTest
Browse files Browse the repository at this point in the history
  • Loading branch information
amolenaar committed Nov 14, 2017
1 parent 35a80c2 commit 4b1c849
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/fitnesse/testsystems/fit/FitClientTest.java
Expand Up @@ -10,7 +10,7 @@
import java.util.ArrayList;
import java.util.List;

import fitnesse.testsystems.CompositeExecutionLogListener;
import fitnesse.testsystems.ConsoleExecutionLogListener;
import fitnesse.testsystems.TestSummary;
import fitnesse.util.MockSocket;
import org.junit.Before;
Expand All @@ -27,7 +27,7 @@ public class FitClientTest implements FitClientListener {
public void setUp() throws Exception {
CommandRunningFitClient.TIMEOUT = 5000;
client = new CommandRunningFitClient(new CommandRunningFitClient.OutOfProcessCommandRunner(
new String[] { "java", "-cp", "build/classes/main", "fit.FitServer", "-v" }, null, new CompositeExecutionLogListener()));
new String[] { "java", "-cp", "build/classes/main", "fit.FitServer", "-v" }, null, new ConsoleExecutionLogListener()));
client.addFitClientListener(this);
}

Expand All @@ -43,6 +43,7 @@ public void testComplete(TestSummary testSummary) {

@Override
public void exceptionOccurred(Throwable e) {
System.out.println("FitClientTest failure: " + e.getMessage());
exceptionOccurred = true;
try {
client.kill();
Expand Down Expand Up @@ -72,7 +73,7 @@ private void doSimpleRun() throws Exception {
@Test
public void testStandardError() throws Exception {
client = new CommandRunningFitClient(new CommandRunningFitClient.OutOfProcessCommandRunner(new String[] { "java", "-Duser.country=US", "-Duser.language=en", "blah" }, null,
new CompositeExecutionLogListener()));
new ConsoleExecutionLogListener()));
client.addFitClientListener(this);
client.start();
Thread.sleep(100);
Expand All @@ -86,7 +87,7 @@ public void testDoesntwaitForTimeoutOnBadCommand() throws Exception {
CommandRunningFitClient.TIMEOUT = 5000;
TimeMeasurement measurement = new TimeMeasurement().start();
client = new CommandRunningFitClient(new CommandRunningFitClient.OutOfProcessCommandRunner(new String[] { "java", "blah" }, null,
new CompositeExecutionLogListener()));
new ConsoleExecutionLogListener()));
client.addFitClientListener(this);
client.start();
Thread.sleep(50);
Expand Down

0 comments on commit 4b1c849

Please sign in to comment.