Improved message to test failure

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2018-12-02 13:57:21 -05:00
parent 901469792d
commit eec660e089

View File

@ -84,14 +84,16 @@ public class ConnectingConsoleInputTest {
@Override @Override
public void apply() throws Exception { public void apply() throws Exception {
try { try {
in.prompt("m1", -1); final String res = in.prompt("m1", -1);
fail("interruption of infinite waiting prompt should cause error"); fail("interruption of infinite waiting prompt should cause error, but was "
+ res);
} catch (final InterruptedIOException e) { } catch (final InterruptedIOException e) {
// ok // ok
} }
try { try {
in.prompt("m2", 5000); final String res = in.prompt("m2", 25000);
fail("interruption of finite waiting prompt should cause error"); fail("interruption of finite waiting prompt should cause error, but was "
+ res);
} catch (final InterruptedIOException e) { } catch (final InterruptedIOException e) {
// ok // ok
} }