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

Declare timeout in test and extract it into manifest #11029

Closed
foolip opened this issue May 16, 2018 · 12 comments
Closed

Declare timeout in test and extract it into manifest #11029

foolip opened this issue May 16, 2018 · 12 comments

Comments

@foolip
Copy link
Member

foolip commented May 16, 2018

https://bugs.chromium.org/p/chromium/issues/detail?id=843213 is about how the information in async_test(undefined, { timeout: 10000 }) isn't machine readable, and so the test runner still can't increase the external timeout based on it.

To make that work, I think the information would have to be in <meta something=somethin> and we should extract it into the manifest for ./wpt run to use.

@foolip
Copy link
Member Author

foolip commented May 16, 2018

@jgraham, how do you deal with slow tests in Gecko?

@jgraham
Copy link
Contributor

jgraham commented May 16, 2018

Setting timeouts on individual tests is deprecated and has been for years; we should remove that feature entirely.

When tests are slow I add <meta name=timeout content=long>. If that isn't enough the test needs to be split up.

@foolip
Copy link
Member Author

foolip commented May 16, 2018

OK, so we already have <meta name=timeout content=long>. Is that information extracted into the manifest and used by the runner already?

@jgraham
Copy link
Contributor

jgraham commented May 16, 2018

Yes.

@foolip
Copy link
Member Author

foolip commented May 16, 2018

Should the per-test timeout be nuked? Nothing about var timeout = properties.timeout ? properties.timeout : settings.test_timeout looks deprecated.

@jgraham
Copy link
Contributor

jgraham commented May 16, 2018

The indicaton that it's deprecated is that that it's not in the documentation. I admit it's not a great signal, as there are lots of other things that aren't deprecated and aren't in the documentation. Anyway I would welcome a PR to remove the feature and all the instances of per-test timeouts in existing tests.

@foolip
Copy link
Member Author

foolip commented May 16, 2018

Trying to throw an exception if it's used to see how many tests are affected in https://chromium-review.googlesource.com/c/chromium/src/+/1061753

But now I'm not sure I understand why testharness.js itself has any notion of timeouts at all. In Chromium's infra we in fact just ignore that and there's only an external timeout. Is there some running environment where we actually trust the browser under test to tell us about timeouts?

@jgraham
Copy link
Contributor

jgraham commented May 16, 2018

wptrunner makes a distinction between an internal timeout ("browser still respodng enough to signal a timeout occurred; keep using the same instance for the next test") and an external timeout ("things are so broken we should kill the browser and restart"). It's possible to just have an external timeout everywhere, but the distinction is meaningful. Also it is helpful for people running tests directly in a browser to understand if they are taking too long.

@foolip
Copy link
Member Author

foolip commented May 16, 2018

OK, I agree that's a meaningful distinction and useful when running manually. I presume the external timeout is always a bit longer, to not make it entirely racy?

@jgraham
Copy link
Contributor

jgraham commented May 16, 2018

Yes. We set the selenium/marionette timeout to the test timeout + 5s and the "give up waiting for the driver to return" timeout to the test timeout + 10s.

@foolip
Copy link
Member Author

foolip commented May 16, 2018

OK, nothing to be done here.

@foolip foolip closed this as completed May 16, 2018
@Hexcles
Copy link
Member

Hexcles commented May 16, 2018

This matches my understanding ("timeouts in tests" are discouraged).

Shall we remove that section from https://web-platform-tests.org/writing-tests/testharness-api.html, or at least mark it as deprecated?

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

4 participants
@jgraham @foolip @Hexcles and others