{"action":"created","issue":{"url":"https://api.github.com/repos/AyuntamientoMadrid/consul/issues/1218","repository_url":"https://api.github.com/repos/AyuntamientoMadrid/consul","labels_url":"https://api.github.com/repos/AyuntamientoMadrid/consul/issues/1218/labels{/name}","comments_url":"https://api.github.com/repos/AyuntamientoMadrid/consul/issues/1218/comments","events_url":"https://api.github.com/repos/AyuntamientoMadrid/consul/issues/1218/events","html_url":"https://github.com/AyuntamientoMadrid/consul/issues/1218","id":294758884,"number":1218,"title":"Flaky spec: Admin budget investments Index Filtering by valuator","user":{"login":"bertocq","id":983242,"avatar_url":"https://avatars1.githubusercontent.com/u/983242?v=4","gravatar_id":"","url":"https://api.github.com/users/bertocq","html_url":"https://github.com/bertocq","followers_url":"https://api.github.com/users/bertocq/followers","following_url":"https://api.github.com/users/bertocq/following{/other_user}","gists_url":"https://api.github.com/users/bertocq/gists{/gist_id}","starred_url":"https://api.github.com/users/bertocq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bertocq/subscriptions","organizations_url":"https://api.github.com/users/bertocq/orgs","repos_url":"https://api.github.com/users/bertocq/repos","events_url":"https://api.github.com/users/bertocq/events{/privacy}","received_events_url":"https://api.github.com/users/bertocq/received_events","type":"User","site_admin":false},"labels":[{"id":825784305,"url":"https://api.github.com/repos/AyuntamientoMadrid/consul/labels/Flaky%20spec","name":"Flaky spec","color":"f4bae8","default":false},{"id":289497015,"url":"https://api.github.com/repos/AyuntamientoMadrid/consul/labels/PRs-welcome","name":"PRs-welcome","color":"159818","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-06T13:28:01Z","updated_at":"2018-02-07T14:50:11Z","closed_at":null,"author_association":"OWNER","body":"# What\r\nTests that fail randomly are called \"flakies\", this one seems to be one:\r\n\r\n**Randomized seed:** 59860\r\n\r\n**Travis failed build:** https://travis-ci.org/AyuntamientoMadrid/consul/jobs/337982693\r\n\r\n**Failure:**\r\n\r\n```\r\n    3) Admin budget investments Index Filtering by valuator\r\n     Failure/Error: expect(page).to have_content('There is 1 investment')\r\n     Capybara::ElementNotFound:\r\n       Unable to find visible xpath \"/html\"\r\n     # ./spec/features/admin/budget_investments_spec.rb:184:in `block (3 levels) in <top (required)>'\r\n```\r\n\r\n# How\r\n- [ ] Explain why the test is flaky, or under which conditions/scenario it fails randomly\r\n- [ ] Explain why your PR fixes it\r\n- [ ] Create a backport PR to consul/consul when the fixing PR is approved\r\n\r\n## Tips for flaky hunting\r\n\r\n### Random values issues\r\nIf the problem comes from randomly generated values, running multiple times a single spec could help you reproduce the failure by running at your command line:\r\n```bash\r\nfor run in {1..10}\r\ndo\r\n  bin/rspec ./spec/features/budgets/investments_spec.rb:256\r\ndone\r\n```\r\n\r\nYou can also try running a single spec in Travis:\r\nAdd option `:focus` to the spec and push your branch to Github, for example:\r\n```ruby\r\nscenario 'Show', :focus do\r\n```\r\n\r\nBut remember to remove that `:focus` changes afterwards when submitting your PR changes!\r\n\r\n### Test order issues\r\nRunning specs in the order they failed may discover that the problem is that a previous test sets an state in the test environment that makes our flaky fail/pass. Tests should be independent from the rest.\r\n\r\nAfter executing rspec you can see the seed used, add it as an option to rspec, for example:\r\n`bin/rspec --seed 55638` (check **Randomized seed** value at beginning of issue)\r\n\r\n### Other things to watch for\r\n- Time related issues (current time, two time or date comparisons with miliseconds/time when its not needed)\r\n- https://semaphoreci.com/community/tutorials/how-to-deal-with-and-eliminate-flaky-tests\r\n"},"comment":{"url":"https://api.github.com/repos/AyuntamientoMadrid/consul/issues/comments/363792104","html_url":"https://github.com/AyuntamientoMadrid/consul/issues/1218#issuecomment-363792104","issue_url":"https://api.github.com/repos/AyuntamientoMadrid/consul/issues/1218","id":363792104,"user":{"login":"vicentemendozam","id":34024463,"avatar_url":"https://avatars0.githubusercontent.com/u/34024463?v=4","gravatar_id":"","url":"https://api.github.com/users/vicentemendozam","html_url":"https://github.com/vicentemendozam","followers_url":"https://api.github.com/users/vicentemendozam/followers","following_url":"https://api.github.com/users/vicentemendozam/following{/other_user}","gists_url":"https://api.github.com/users/vicentemendozam/gists{/gist_id}","starred_url":"https://api.github.com/users/vicentemendozam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicentemendozam/subscriptions","organizations_url":"https://api.github.com/users/vicentemendozam/orgs","repos_url":"https://api.github.com/users/vicentemendozam/repos","events_url":"https://api.github.com/users/vicentemendozam/events{/privacy}","received_events_url":"https://api.github.com/users/vicentemendozam/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T14:50:11Z","updated_at":"2018-02-07T14:50:11Z","author_association":"NONE","body":"I'll try this one :+1: "}}
{"actor":{"display_login":"vicentemendozam"}}