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

Add better error messages when flaky tests fail #1445

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Apr 1, 2021

cat https://www.youtube.com/watch?v=amYzBQMT4VI | sed 's/snakes/flaky tests/' | sed 's/plane/CI/'

ivoanjo added 2 commits April 1, 2021 12:25
This test is flaky, see for instance
<https://app.circleci.com/pipelines/github/DataDog/dd-trace-rb/3112/workflows/51134bcc-d765-420e-a2ea-e64b00278ade/jobs/124412>
so let's add some extra information that can guide us to fix the
cause whenever it fails.

Here's an example of how it looks when it fails (in this case,
I left the `Gemfile` open):

```
Open fds before: {"/dev/fd/0"=>"/dev/pts/0", "/dev/fd/1"=>"/dev/pts/0",
"/dev/fd/2"=>"/dev/pts/0", "/dev/fd/3"=>nil, "/dev/fd/4"=>nil,
"/dev/fd/5"=>nil, "/dev/fd/6"=>nil, "/dev/fd/7"=>nil}
Open fds after:  {"/dev/fd/0"=>"/dev/pts/0", "/dev/fd/1"=>"/dev/pts/0",
"/dev/fd/2"=>"/dev/pts/0", "/dev/fd/3"=>nil, "/dev/fd/4"=>nil,
"/dev/fd/5"=>nil, "/dev/fd/6"=>nil, "/dev/fd/7"=>"/app/Gemfile",
"/dev/fd/8"=>nil}
```
This test is flaky, see for instance
<https://app.circleci.com/pipelines/github/DataDog/dd-trace-rb/3112/workflows/51134bcc-d765-420e-a2ea-e64b00278ade/jobs/124400>
so let's add some extra information that can guide us to fix the
cause whenever it fails.
@ivoanjo ivoanjo requested a review from a team April 1, 2021 11:37
@marcotc marcotc merged commit 489dda2 into master Apr 1, 2021
@marcotc marcotc deleted the ivoanjo/hunt-down-flaky-tests branch April 1, 2021 18:19
@github-actions github-actions bot added this to the 0.48.0 milestone Apr 1, 2021
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.

2 participants