Skip to content

Commit 4308632

Browse files
committed
malva: Fix ProcessTest#testExitValue
The "more LICENSE" command returns successfully on my home laptop. Use "sleep 10" instead to make sure we're checking for exit value before the process under test has exited. Signed-off-by: Pekka Enberg <penberg@kernel.org>
1 parent 9c9545a commit 4308632

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/malva/java/lang/ProcessTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public static void testExitValue() {
3232
}
3333

3434
try {
35-
ProcessBuilder processBuilder = new ProcessBuilder("more", "LICENSE");
35+
ProcessBuilder processBuilder = new ProcessBuilder("sleep", "10");
3636
final Process process = processBuilder.start();
3737

38-
assertThrows(new Block(){
38+
assertThrows(new Block() {
3939
@Override public void run() {
4040
process.exitValue();
4141
}
@@ -119,4 +119,4 @@ public static void main(String[] args) {
119119
testGetOutputStream();
120120
testWaitFor();
121121
}
122-
}
122+
}

0 commit comments

Comments
 (0)