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
public void apply() throws Exception {
try {
in.prompt("m1", -1);
fail("interruption of infinite waiting prompt should cause error");
final String res = in.prompt("m1", -1);
fail("interruption of infinite waiting prompt should cause error, but was "
+ res);
} catch (final InterruptedIOException e) {
// ok
}
try {
in.prompt("m2", 5000);
fail("interruption of finite waiting prompt should cause error");
final String res = in.prompt("m2", 25000);
fail("interruption of finite waiting prompt should cause error, but was "
+ res);
} catch (final InterruptedIOException e) {
// ok
}