Browse Source

[NO-JIRA] Fix Validate Task

tags/9.3.0.51899
Belen Pruvost 2 years ago
parent
commit
f4aa4a1a4e

+ 6
- 5
sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java View File

@@ -124,13 +124,14 @@ public class CommandExecutorTest {

@Test(timeout = 6000L)
public void should_stop_after_timeout_and_new_shell() throws IOException {
try {
String executable = getScript("forever");
String executable = getScript("forever");

assertThatThrownBy(() -> {
CommandExecutor.create().execute(Command.create(executable).setNewShell(true).setDirectory(workDir), 100);
fail();
} catch (TimeoutException e) {
// ok
}
})
.isInstanceOf(TimeoutException.class);
}

@Test

Loading…
Cancel
Save