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

consolidate saucelabs tests to address flake #3019

Merged
merged 2 commits into from Sep 28, 2017
Merged

consolidate saucelabs tests to address flake #3019

merged 2 commits into from Sep 28, 2017

Conversation

boneskull
Copy link
Member

may or may not fix #2890.

@boneskull
Copy link
Member Author

I don't know how to actually test for the existence of flake except to merge this and see if it works consistently.

@boneskull boneskull added this to the v4.0.0 milestone Sep 27, 2017
@boneskull
Copy link
Member Author

tentatively stuffing into v4, but reserve the right to pull out if it becomes a morass.

I'll keep rebasing this.

@boneskull boneskull force-pushed the issue/2890 branch 4 times, most recently from 367b190 to 74418cb Compare September 27, 2017 20:26
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 367b190 on issue/2890 into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 918d78a on issue/2890 into ** on master**.

@ScottFreeCode
Copy link
Contributor

I don't know how to actually test for the existence of flake except to merge this and see if it works consistently.

That's pretty much where I'm at too. No idea what causes it, just that it always fits a certain pattern (specific browsers and hanging after one of two particular tests) when it does happen. Some of my investigation suggested a similar-looking issue could be caused by something going wrong in Mocha leading to a hanging test run after a suppressed internal error having to do with stringification and circular references, but that doesn't necessarily mean that that issue I discovered is the cause of the CI flake -- they could be unrelated problems that would just happen to look similar in their results.

Keeping the Sauce tunnel open seems like a good idea anyway, so it's definitely worth a shot.

Probably the only caveat I have about fiddling with how we run browser tests is that right now it's easy to see in the Travis jobs list which browser failed, but if we merged it into one Travis job we'd have to dig through pages of Karma output to find any errors. (This goes not just for flakes like this but for any test failure in a browser run.) If for some reason we need to do that, it isn't unmanageable; it's just the only potential con I can think of to any of the options we have.

On the other hand, besides potentially fixing the flake, this looks like it makes the CI run much, much faster. Tradeoffs...

it('should provide an example', function (done) {
http.get({ path: '/', port: 8888 }, function (res) {
http.get({ path: '/', port: port }, function (res) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my two cents' worth, but I don't think we should be adding dependencies to tweak this test. It doesn't seem to be a real unit test of Mocha to begin with -- probably more like an example use case. If it's causing trouble we should stop running it and (if we want to keep it as an example) move it into documentation somewhere instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I didn't really stop to wonder why this test was running at all... it's just always been there.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ffd5e80 on issue/2890 into ** on master**.

@boneskull
Copy link
Member Author

@ScottFreeCode yeah, it does give better visibility into which browser failed.

that being said, I'm fully behind trying to get Jenkins running, since it'll give us more control (and information). I have a droplet; just need to configure the thing.

@boneskull
Copy link
Member Author

so far the only failures I've seen have not been of the "couldn't start a browser" variety, and I've ran quite a few builds today.

- remove some "unit" tests of questionable value
- linting of `karma.conf.js`
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a67bb6c on issue/2890 into ** on master**.

@boneskull
Copy link
Member Author

@ScottFreeCode anyhow, this LGTM. I'll merge it tomorrow w/ your blessing

Copy link
Contributor

@ScottFreeCode ScottFreeCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do this!

@boneskull boneskull merged commit 0ed5297 into master Sep 28, 2017
@boneskull boneskull deleted the issue/2890 branch September 28, 2017 18:02
sgilroy pushed a commit to TwineHealth/mocha that referenced this pull request Feb 27, 2019
- run browser tests concurrently to avoid SauceLabs flake
- remove some "unit" tests of questionable value
- linting of `karma.conf.js`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mocha's hanging CI browser tests
3 participants