Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore: fix tests and CI flakiness #16806

Closed
wants to merge 8 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Jan 3, 2019

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
CI-/Test-related chores.

What is the current behavior? (You can also link to an open issue here)
CI is broken and extra flaky.

What is the new behavior (if this is a feature change)?
CI is neither broken nor flaky.

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

@gkalpak gkalpak force-pushed the chore-try-to-fix-CI branch 3 times, most recently from 3ae49db to 097aa69 Compare January 3, 2019 16:16
@Narretz Narretz mentioned this pull request Jan 4, 2019
3 tasks
@gkalpak gkalpak force-pushed the chore-try-to-fix-CI branch 5 times, most recently from 2df3547 to d68189b Compare January 8, 2019 13:17
@gkalpak gkalpak force-pushed the chore-try-to-fix-CI branch 18 times, most recently from a8eae83 to eae7e59 Compare January 9, 2019 19:04
@gkalpak gkalpak force-pushed the chore-try-to-fix-CI branch from eae7e59 to b96d334 Compare January 9, 2019 19:25
@gkalpak gkalpak changed the title WIP chore: fix tests and CI flakiness Jan 9, 2019
@gkalpak gkalpak added this to the 1.7.x milestone Jan 9, 2019
@gkalpak
Copy link
Member Author

gkalpak commented Jan 9, 2019

The latest Safari on Saucelabs (v12) is very unstable and disconnecting all the time, so I removed it from the browser list.

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

All looks promising

@@ -189,6 +184,9 @@ module.exports = function(config, specificOptions) {
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
config.sauceLabs.recordScreenshots = true;

// Try 'websocket' for a faster transmission first. Fallback to 'polling' if necessary.
config.transports = ['websocket', 'polling'];

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this not the default?

Copy link
Member Author

Choose a reason for hiding this comment

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

According to the docs, the default is ['polling', 'websocket'] and it is not clear if ordering makes a difference, so I thought it wouldn't hurt to match angular/angular#27634.
But, yeah, this might be redundant.

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that socket.io will

By default, a long-polling connection is established first, then upgraded to “better” transports (like WebSocket).

So if I understand it, ['polling', 'websocket'] would connect with polling initially and then try to connect via a websocket. Seems strange but I guess that polling comes up quicker for short-lived connections?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷‍♂️

CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr"
# We don't want to create a log file because sauceconnect always logs in verbose mode. This seems
# to be overwhelming Travis and causing flakes when we are cat-ing the log in "print_logs.sh"
CONNECT_LOG="/dev/null"
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting!

Copy link
Member Author

Choose a reason for hiding this comment

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

TBH, I don't know if it was actually affecting flakiness. I was just porting bits that looked useful from Angular PRs. (This came from angular/angular#27657.)

@@ -7,5 +7,5 @@ for FILE in $LOG_FILES; do
echo "================================================================================"
echo " $FILE"
echo "================================================================================"
cat $FILE
cat $FILE || true
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this cat fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

If there are no log files, then for FILE in $LOG_FILES uses $LOGS_DIR/* literally, which does not exist and thus cat fails.

@gkalpak gkalpak force-pushed the chore-try-to-fix-CI branch 2 times, most recently from 75997bc to b96d334 Compare January 10, 2019 11:04
@gkalpak gkalpak closed this in be45d3c Jan 10, 2019
gkalpak added a commit that referenced this pull request Jan 10, 2019
@gkalpak gkalpak deleted the chore-try-to-fix-CI branch April 27, 2019 14:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants