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

♻️[e2e] wait request to reach server before assertions #229

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Jan 9, 2020

Some logs/rum requests were handled by the server after the end of the test.

Before:

GET /logs 
[]
GET /reset
POST /logs 
XXX
YYY

After:

GET /logs 
[]
POST /logs 
XXX
YYY
GET /logs 
[XXX,YYY]
GET /reset

@bcaudan bcaudan requested a review from a team as a code owner January 9, 2020 14:28
@bcaudan bcaudan changed the title ♻️[e2e] wait to have receive logs/rum events before asserting … ♻️[e2e] wait request to reach server before assertions Jan 9, 2020
@bcaudan bcaudan changed the title ♻️[e2e] wait request to reach server before assertions ♻️[e2e] wait request to reach server before assertions Jan 9, 2020
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer left a comment

Choose a reason for hiding this comment

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

OK, I don't like this very much but I don't have any other solution. Two issues I could imagine:

  • the server already had a log/rum event, so the events list wouldn't be empty, but this event was not the one the test was waiting for.
  • in the future we could write a test to ensure no log or event is sent to the server. This wouldn't be possible with this solution.

Anyway, I guess it solves the issue we are facing right now.

test/e2e/scenario/agents.scenario.ts Outdated Show resolved Hide resolved
test/e2e/scenario/helpers.ts Outdated Show resolved Hide resolved
test/e2e/scenario/helpers.ts Outdated Show resolved Hide resolved
@bcaudan
Copy link
Contributor Author

bcaudan commented Jan 10, 2020

OK, I don't like this very much but I don't have any other solution. Two issues I could imagine:

  • the server already had a log/rum event, so the events list wouldn't be empty, but this event was not the one the test was waiting for.
  • in the future we could write a test to ensure no log or event is sent to the server. This wouldn't be possible with this solution.

Anyway, I guess it solves the issue we are facing right now.

@BenoitZugmeyer I agree, I have a couple other ideas in mind but I'd prefer to encounter these issues before handling them.

@bcaudan bcaudan merged commit c001b04 into master Jan 10, 2020
@bcaudan bcaudan deleted the bcaudan/e2e-wait branch January 10, 2020 13:10
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.

3 participants