From 3bb4b0c95e857268cbf527a856a32d5361d6ef89 Mon Sep 17 00:00:00 2001 From: Fried Hoeben Date: Sun, 4 Dec 2016 09:32:35 +0100 Subject: [PATCH] Don't use pipe via console on windows, fixes #989 --- src/fitnesse/testsystems/slim/SlimClientBuilder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fitnesse/testsystems/slim/SlimClientBuilder.java b/src/fitnesse/testsystems/slim/SlimClientBuilder.java index def3f78a76..5e4cf55008 100644 --- a/src/fitnesse/testsystems/slim/SlimClientBuilder.java +++ b/src/fitnesse/testsystems/slim/SlimClientBuilder.java @@ -14,6 +14,7 @@ import fitnesse.socketservice.PlainServerSocketFactory; import fitnesse.socketservice.SslClientSocketFactory; import fitnesse.testsystems.*; +import org.apache.commons.lang.SystemUtils; public class SlimClientBuilder extends ClientBuilder { public static final String SLIM_PORT = "SLIM_PORT"; @@ -78,7 +79,7 @@ public void write(String output) { /** * This reverts the wrap that the LoggingOutputStream.flush method * is doing. - * + * * @param prefixedMessage * @param level * @return == null : the message is not prefixed with the given @@ -226,7 +227,9 @@ private int getSlimPortBase() { } catch (NumberFormatException e) { // stick with default } - return SLIM_USE_PIPE_PORT; + // Windows console does not support Unicode (by default) + // so we use a socket by default on Windows. + return SystemUtils.IS_OS_WINDOWS ? 0 : SLIM_USE_PIPE_PORT; } private int getSlimPortPoolSize() {