diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java index 1cc68e21bb..a5a0d6bd57 100644 --- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java +++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java @@ -1815,7 +1815,15 @@ public abstract class HudsonTestCase extends TestCase implements RootAction { } public Page goTo(String relative, String expectedContentType) throws IOException, SAXException { - Page p = super.getPage(getContextPath() + relative); + Page p; + try { + p = super.getPage(getContextPath() + relative); + } catch (IOException x) { + if (x.getCause() != null) { + x.getCause().printStackTrace(); + } + throw x; + } assertEquals(expectedContentType,p.getWebResponse().getContentType()); return p; } diff --git a/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java b/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java index d74a44c9e9..fa01b7709a 100644 --- a/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java +++ b/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java @@ -1941,7 +1941,15 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction { */ public Page goTo(String relative, @CheckForNull String expectedContentType) throws IOException, SAXException { assert !relative.startsWith("/"); - Page p = super.getPage(getContextPath() + relative); + Page p; + try { + p = super.getPage(getContextPath() + relative); + } catch (IOException x) { + if (x.getCause() != null) { + x.getCause().printStackTrace(); + } + throw x; + } if (expectedContentType != null) { assertThat(p.getWebResponse().getContentType(), is(expectedContentType)); }