-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Faster smoketest. Fix Flaky works-offline gather #506
Conversation
@samccone ptal! |
@@ -3,34 +3,36 @@ | |||
cd lighthouse-cli/test/fixtures && python -m SimpleHTTPServer 9999 & | |||
|
|||
NODE=$([ $(node -v | grep -E "v4") ] && echo "node --harmony" || echo "node") | |||
offline200result="URL responds with a 200 when offline" | |||
config="$PWD/lighthouse-cli/test/fixtures/smoketest-config.json" | |||
flags="--audit-whitelist=works-offline,viewport --config-path=$config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need both an audit-whitelist and a custom config path. The whitelist works to remove unnecessary audits from the default config, but if using a custom config the audit list is already smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need both an audit-whitelist and a custom config path.
true. only need the config. Will take care of that.
audit-whitelist removed. killed the boolean trap. |
static goOffline(driver) { | ||
return driver.sendCommand('Network.emulateNetworkConditions', { | ||
offline: true, | ||
static config(opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{offline}
here would be reeeeeal nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure but we're not using destructuring as we need to support node v4 w/ --harmony
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh snap kk
The smoketest is now massively faster. We use a custom config and audit-whitelist for our run to be super fast.
There was flakiness with the works-offline test. As it turns out
network.enable
must be on before offline is triggered.