From d5a19e9d67fe3286b5d7ac5aec6fbcc3ac034767 Mon Sep 17 00:00:00 2001 From: tfennelly Date: Sun, 23 Aug 2015 14:14:37 +0100 Subject: [PATCH] RelativePathTest fixes --- .../java/org/jvnet/hudson/test/HudsonTestCase.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 19cc0bd2de..6543b55e57 100644 --- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java +++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java @@ -25,13 +25,11 @@ package org.jvnet.hudson.test; import com.gargoylesoftware.htmlunit.AlertHandler; +import com.gargoylesoftware.htmlunit.WebClientUtil; import com.gargoylesoftware.htmlunit.WebRequest; -import com.gargoylesoftware.htmlunit.WebResponse; -import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.html.DomNodeUtil; import com.gargoylesoftware.htmlunit.html.HtmlFormUtil; import com.gargoylesoftware.htmlunit.html.HtmlImage; -import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; import com.google.inject.Injector; import hudson.ClassicPluginStrategy; @@ -1818,7 +1816,11 @@ public abstract class HudsonTestCase extends TestCase implements RootAction { @SuppressWarnings("unchecked") @Override public Page getPage(String url) throws IOException, FailingHttpStatusCodeException { - return super.getPage(url); + try { + return super.getPage(url); + } finally { + WebClientUtil.waitForJSExec(this); + } } /** @@ -1842,6 +1844,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction { Page p; try { p = super.getPage(getContextPath() + relative); + WebClientUtil.waitForJSExec(this); } catch (IOException x) { if (x.getCause() != null) { x.getCause().printStackTrace(); -- GitLab