Skip to content
Permalink
Browse files
[JENKINS-50790] Temporarily override pageLoadTimeout for available pl…
…ugins

This should fix most of GitPluginTest and some others that are failing due to the
available plugins taking too much time to load on ci.jenkins.io
  • Loading branch information
raul-arabaolaza committed Apr 17, 2018
1 parent ab1fb47 commit 012364d1a5f6386fab49198c16d00e0cd309a7d9
@@ -80,6 +80,8 @@

public static final String DOM_MAX_SCRIPT_RUN_TIME = "dom.max_script_run_time";
public static final String DOM_MAX_CHROME_SCRIPT_RUN_TIME = "dom.max_chrome_script_run_time";
public static int PAGE_LOAD_TIMEOUT = 30;
public static int IMPLICIT_WAIT_TIMEOUT = 1;

@Override
protected void configure() {
@@ -193,8 +195,8 @@ public WebDriver createWebDriver(TestCleaner cleaner, TestName testName, Elastic
d.register(new Scroller());

try {
d.manage().timeouts().pageLoadTimeout(time.seconds(30), TimeUnit.MILLISECONDS);
d.manage().timeouts().implicitlyWait(time.seconds(1), TimeUnit.MILLISECONDS);
d.manage().timeouts().pageLoadTimeout(time.seconds(PAGE_LOAD_TIMEOUT), TimeUnit.MILLISECONDS);
d.manage().timeouts().implicitlyWait(time.seconds(IMPLICIT_WAIT_TIMEOUT), TimeUnit.MILLISECONDS);
} catch (UnsupportedCommandException e) {
// sauce labs RemoteWebDriver doesn't support this
System.out.println(base + " doesn't support page load timeout");
@@ -14,6 +14,7 @@

import com.google.common.base.Predicate;
import org.apache.commons.lang3.StringUtils;
import org.jenkinsci.test.acceptance.FallbackConfig;
import org.jenkinsci.test.acceptance.junit.WithPlugins;
import org.jenkinsci.test.acceptance.update_center.PluginMetadata;
import org.jenkinsci.test.acceptance.update_center.PluginSpec;
@@ -227,8 +228,12 @@ public boolean installPlugins(final PluginSpec... specs) throws UnableToResolveD
}
}
} else {
// JENKINS-50790 It seems that this page takes too much time to load when running in the new ci.jenkins.io
driver.manage().timeouts().pageLoadTimeout(time.seconds(60), TimeUnit.MILLISECONDS);
visit("available");

driver.manage().timeouts().pageLoadTimeout(time.seconds(FallbackConfig.PAGE_LOAD_TIMEOUT), TimeUnit.MILLISECONDS);
// End JENKINS-50790

final ArrayList<PluginSpec> update = new ArrayList<>();
for (final PluginSpec n : specs) {
switch (installationStatus(n)) {

0 comments on commit 012364d

Please sign in to comment.