[chore] Remove commented out code
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
8025122906
commit
a9c97a7ebc
@ -14,7 +14,6 @@ import java.util.function.Supplier;
|
||||
import net.bigeon.gclc.manager.ConsoleInput;
|
||||
import net.bigeon.test.junitmt.FunctionalTestRunnable;
|
||||
import net.bigeon.test.junitmt.ThreadTest;
|
||||
import net.bigeon.test.junitmt.api.TestFunction;
|
||||
|
||||
/** @author Emmanuel Bigeon */
|
||||
public final class InputContract {
|
||||
@ -38,24 +37,17 @@ public final class InputContract {
|
||||
// Test interruption contract
|
||||
final ConsoleInput input2 = inputs.get();
|
||||
final FunctionalTestRunnable prompting = new FunctionalTestRunnable(
|
||||
new TestFunction() {
|
||||
|
||||
@Override
|
||||
public void apply() throws Exception {
|
||||
try {
|
||||
input2.prompt();
|
||||
fail("Interrupted prompt should throw INterruptedIOException");
|
||||
} catch (final InterruptedIOException e) {
|
||||
// ok
|
||||
}
|
||||
() -> {
|
||||
try {
|
||||
input2.prompt();
|
||||
fail("Interrupted prompt should throw INterruptedIOException");
|
||||
} catch (final InterruptedIOException e) {
|
||||
// ok
|
||||
}
|
||||
});
|
||||
final Thread th = new Thread(prompting);
|
||||
th.start();
|
||||
// while (!input2.isPrompting()) {
|
||||
th.join(200);
|
||||
//
|
||||
// }
|
||||
input2.interruptPrompt();
|
||||
ThreadTest.assertRuns(th, prompting);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user