Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout is ignored (on Jenkins) #61

Open
Stephs15 opened this issue Jul 9, 2018 · 6 comments
Open

Timeout is ignored (on Jenkins) #61

Stephs15 opened this issue Jul 9, 2018 · 6 comments

Comments

@Stephs15
Copy link

Stephs15 commented Jul 9, 2018

I am trying to run the accessibility tests on Jenkins (with CentOS) and I am having a weird issue with the config files. When I use a .json configuration file, works fine. But when I use a .js file to dynamically generate the urls it ignores the timeout set for the url. I just get

Error: waiting for function failed: timeout 30000ms exceeded

no matter the timeout that I specify. I tried also to put the timeout under default, but is the same result. Locally everything runs fine.

Here is the part where I set the urls and actions. After, there is a loop that replaces ${TEST_URL} for the real one. Sadly, I cannot give the real urls.

let urls = [
    {
        url: '${TEST_URL}',
        timeout: 5000000, //Big timeout just to test
        actions: [
            "navigate to ${TEST_URL}/stuff/stuff...", // Intermediate url to add sth to the cart
            "navigate to ${TEST_URL}", //Go back to the main url
            "click element #goToAnotherPageBtn",
            "wait for .some__box to be visible"
        ]
    }
];
@rowanmanning
Copy link
Member

Hey @Stephs15, would it be possible to see your full config (with URLs anonymised)? Thanks

@Stephs15
Copy link
Author

Stephs15 commented Aug 1, 2018

Hi! Srry for the delay. Here it is :)

const defaults = {
    standard: "WCAG2A",
    ignore: [ "notice", "warning"],
    chromeLaunchConfig: {
        args: ["--no-sandbox"]
    }
};
 
let urls = [
    {
        url: '${URL}',
        timeout: 5000000, //Big timeout just to test
        rootElement: '.some__box',
        actions: [
            "navigate to ${URL}/url-to-add-articles-to-cart",
            "navigate to ${URL}/",
            'wait for element #goToCart to be visible',
            "click element #goToCart",
            "wait for url to be ${URL}/cart-url"
        ]
    },
];
 
function conf() {
    for (let idx = 0; idx < urls.length; idx++) {
        console.log(urls[idx].url.replace('${URL}', process.env.URL));
        urls[idx].url = urls[idx].url.replace('${URL}', process.env.URL);
        for (let ida = 0; ida < urls[idx].actions.length; ida++) {
            urls[idx].actions[ida] = urls[idx].actions[ida].replace('${URL}', process.env.URL);
        }
    }
    return {
        defaults: defaults,
        urls: urls
    };
}
 
// Important ~ call the function, don't return a reference to it!
module.exports = conf();

@AssassinLV
Copy link

AssassinLV commented May 31, 2019

@rowanmanning
same for me while running from TFS powershell step - I have default timeout - and it is ignored:

"defaults": {
        "timeout": 10000000,
        "viewport": {
            "width": 700,
            "height": 1200,
            "isMobile": true,
            "hasTouch": true
        }
    },

(can't provide whole config, also the individual timeouts are also ignored)

@AssassinLV
Copy link

AssassinLV commented Jun 6, 2019

@Stephs15 @rowanmanning

Ok - now I understand that there are two timeouts:
1st: that we can configure - the max test length
2nd: a timeout for "wait" commands - that I don't think we should be able to configure - but it should be documented.

So what happen was that for me a test was waiting for an element to appear - which did not appear in 30 seconds so the test failed with "30 second" timeout instead of my configured 10000 second timeout.
So I guess - not a bug, but an undocumented feature.

@yvkschaefer
Copy link

Is there a way to override the 30 second timeout? My understanding is that this comes from puppeteer. Also separate question, is there a reason pa11y-ci uses puppeteer version ~1.20.0 when puppeteer is up to 5.5.0?

@josebolos josebolos added this to the 3.0 milestone Jun 28, 2021
@Astha-Anand
Copy link

Astha-Anand commented Apr 15, 2022

We are also facing similar issue. Any way to solve timeout issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants