Fix intermittent metrics e2e test failure#9980
Merged
Conversation
Member
Author
|
This depends upon #9979 |
Collaborator
Builds ready [7a42dd0]
Page Load Metrics (323 ± 33 ms)
|
Base automatically changed from
move-initial-e2e-navigation-into-tests
to
develop
December 3, 2020 17:30
The metrics e2e test would fail if the segment events still weren't dispatched when the page loaded. The Segment events are sent on a set interval, so it isn't abnormal for them to lag behind the page load itself. The `waitUntilCalled` utility has been used to wait until all required events have been dispatched. The `wait-until-called` module was converted to an ES5 module, so that it could be used from an e2e test. The optional `callCount` parameter has also been added, to allow waiting for more than one call. The `segmentSpy` had to be converted to a `segmentStub`, to allow the `waitUntilCalled` utility to be used.
7a42dd0 to
36a7d78
Compare
Collaborator
Builds ready [36a7d78]
Page Load Metrics (380 ± 41 ms)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The metrics e2e test would fail if the segment events still weren't dispatched when the page loaded. The Segment events are sent on a set interval, so it isn't abnormal for them to lag behind the page load itself. The
waitUntilCalledutility has been used to wait until all required events have been dispatched.The
wait-until-calledmodule was converted to an ES5 module, so that it could be used from an e2e test. The optionalcallCountparameter has also been added, to allow waiting for more than one call.The
segmentSpyhad to be converted to asegmentStub, to allow thewaitUntilCalledutility to be used.