modernHook was also failing on ci.jenkins.io rather than being skipped.
@@ -56,6 +56,7 @@ import org.jenkinsci.plugins.workflow.test.steps.SemaphoreStep;
import org.jenkinsci.test.acceptance.docker.DockerRule;
import static org.junit.Assert.*;
import static org.junit.Assume.assumeThat;
+import org.junit.AssumptionViolatedException;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
@@ -196,7 +197,12 @@ public class PipelineTest {
LogTaskListener listener = new LogTaskListener(Logger.getLogger(getClass().getName()), Level.INFO);
final HgExe hg = new HgExe(installation, null, r.jenkins.createLauncher(
listener), r.jenkins, listener, new EnvVars());
- String version = hg.version();
+ String version;
+ try {
+ version = hg.version();
+ } catch (Exception x) {
+ throw new AssumptionViolatedException("cannot run hg version; perhaps not installed locally", x);
+ }
// I could not find the exact version when the new hooks were added, but not found on any 2.x
// and found in all the 3.x versions I could get my hands on
assumeThat("Need mercurial 3.0ish to have in-process hooks, have " + version,
