You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason cucumber tests are failing for me when I run them locally in main branch. For example, I currently have a clean local copy on commit 9cd3a46 and here is what I get:
$ be cucumber features/old_version_json.feature:12
Using the default profile...
....F
(::) failed steps (::)
Ambiguous match, found 3 elements matching visible css " .t-line-summary" (Capybara::Ambiguous)
./features/step_definitions/html_steps.rb:55:in `/^I should see a (.+) coverage summary of (\d+)\/(\d+)( for the file)?$/'
features/old_version_json.feature:18:in `I should see a line coverage summary of 8/9'
Failing Scenarios:
cucumber features/old_version_json.feature:12 # Scenario: Running the tests succeeds
1 scenario (1 failed)
5 steps (1 failed, 4 passed)
0m6.321s
GRML... I have no idea right now and not too much OSS time on my hand. I'lll take a look hopefully at the latest on Saturday.
It's just fun because this is a classic case of "works on my machine" which isn't too surprising (-CI) as that's probably how it got there in the first place.
Just some... extra fun for me. Yay.
tobi@speedy:~/github/simplecov(main)$ git pull
Already up to date.
tobi@speedy:~/github/simplecov(main)$ be cucumber
Using the default profile...
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
76 scenarios (76 passed)
478 steps (478 passed)
1m31.649s
tobi@comfy:~/github/simplecov(main)$ be rake
Running RuboCop...
Inspecting 99 files
...................................................................................................
99 files inspected, no offenses detected
/home/tobi/.asdf/installs/ruby/2.7.0/bin/ruby -I/home/tobi/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.2/lib:/home/tobi/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-support-3.9.3/lib /home/tobi/.asdf/installs/ruby/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
Randomized with seed 2220
................................................................................................................................................................................................................................................................................................................................................
Non-app warnings written to tmp/warnings.txt
Finished in 7.41 seconds (files took 0.2317 seconds to load)
336 examples, 0 failures
Randomized with seed 2220
/home/tobi/.asdf/installs/ruby/2.7.0/bin/ruby -S bundle exec cucumber
Warning: the running version of Bundler (2.1.3) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.
Using the default profile...
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
76 scenarios (76 passed)
478 steps (478 passed)
2m57.244s
Ambiguous match, found 8 elements matching visible css " .t-line-summary" (Capybara::Ambiguous)
./features/step_definitions/html_steps.rb:55:in `/^I should see a (.+) coverage summary of (\d+)\/(\d+)( for the file)?$/'
features/branch_coverage.feature:21:in `I should see a line coverage summary of 56/61'
It's visible exactly once but somehow on CI and your machines it doesn't care about that/do the visibility checking correctly.
So... I mean it could be race condition or maybe the css doesn't work as it should or what not...
deactivating the visible: true leads to exactly the same errors (unsurprisingly) just no idea why or how:
Ambiguous match, found 8 elements matching visible css " .t-line-summary" (Capybara::Ambiguous)
./features/step_definitions/html_steps.rb:55:in `/^I should see a (.+) coverage summary of (\d+)\/(\d+)( for the file)?$/'
features/branch_coverage.feature:21:in `I should see a line coverage summary of 56/61'
I'm starting to think that the JS is probably not working and I'm not sure why....
Unable to find button "cboxClose" that is not disabled (Capybara::ElementNotFound)
./features/step_definitions/html_steps.rb:69:in `"I close the detailed view"'
features/pagination.feature:20:in `I close the detailed view'
cbxClose is from the modal that should open when a link is clicked... so I guess it's not clicked.
At this point maybe the assets are messed up or the the driver doesn't execute JS... I'm not sure. I confirmed google chrome is installed and apparition is configured... let's see.
Good thinking but October 22 hasn't passed yet and ubuntu-latest refers to 18.04 apparently even 🤔 tried explicit 20.04 and 18.04, nothing works. At this point rewriting the class selectors to be unique among visible/not visible might be the safest bet to long term resolve this but that's quite some work I'm not quite sure I got the head space for right now :|
no idea why when or how it happened... there were a couple of failures on main but those are different :(
you're on the right track though, theoretically it could have been only some package update but which one, why or how is... fun to debug with me being unable to reproduce.
I could try the work mac for another data point...
Yeah... I can't quite figure it out. It seems somewhat most likely as that's one of the places where we differ as I'm not using chrome but chromium, difference shouldn't be big but still... :|
Ha! I realize I might've run into the same thing in other repository, but I reverted the base docker image to the last working version and didn't dig further.
I guess an easy test we can do is revert b0d8826 and upgrade to the latest cuprite to see if the issues I had with it when migrating to Github Actions are now fixed. That would be the third switch we make because of issues with the alternative 😆.
This is... very weird. Unless the error message is wrong:
expected: 0
got: 4
(compared using ==)
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/html_steps.rb:28:in `/^I should see the source files:$/'
features/merging_test_unit_and_rspec.feature:42:in `I should see the source files:'
expected: 0
got: 5
(compared using ==)
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/html_steps.rb:28:in `/^I should see the source files:$/'
features/skipping_code_blocks_manually.feature:60:in `I should see the source files:'
# Find all filenames and their coverage present in coverage report
files=available_source_files.mapdo |file_row|
this means that expected_files.length is 0 to my interpretation. And that definitely should not be flaky as that's just the hash from the cucumber scenario...
ah right the thing in expect is the actual not the expected... yeah that makes more sense. I hope I can give it another look this evening. It looks a bit scary as that might be further visibility shenanigans like I was facing with other browsers. Hopefully it's just a timing issue which I should be able to fix
It's interesting... because we see the groups for one of the 2 examples but then don't see the source files... which is very strange.
And I should see the groups:
| name | coverage | files |
| All Files | 90.48% | 4 |
And I should see the source files:
| name | coverage |
| lib/faked_project.rb | 100.00 % |
# ...
Some of the tests are still semi randomly failing like this one:
expected to find visible css ".t-file" 4 times but there were no matches. Also found "lib/faked_project/some_class.rb 80.00 % 30 15 12 3 1.73", "lib/faked_project/framework_specific.rb 87.50 % 20 8 7 1 1.50", "lib/faked_project.rb 100.00 % 13 6 6 0 4.00", "lib/faked_project/meta_magic.rb 100.00 % 26 13 13 0 2.00", which matched the selector but not all filters. (Capybara::ExpectationNotMet)
./features/step_definitions/html_steps.rb:25:in `/^I should see the source files:$/'
features/merging_test_unit_and_rspec.feature:42:in `I should see the source files:'
Failing Scenarios:
cucumber features/merging_test_unit_and_rspec.feature:11 # Scenario:
76 scenarios (1 failed, 7 skipped, 68 passed)
478 steps (1 failed, 40 skipped, 437 passed)
10m1.127s
Error: Process completed with exit code 1.
0s
0s
I’m going to close this as stale. For what it’s worth, tests have been passing for me both locally and in CI. Feel free to reopen this issue or open a new one if this issue reoccurs.
Activity
PragTob commentedon Sep 3, 2020
GRML... I have no idea right now and not too much OSS time on my hand. I'lll take a look hopefully at the latest on Saturday.
It's just fun because this is a classic case of "works on my machine" which isn't too surprising (-CI) as that's probably how it got there in the first place.
Just some... extra fun for me. Yay.
PragTob commentedon Sep 6, 2020
Also works on my other machine...
SO MUCH FUN
PragTob commentedon Sep 6, 2020
Looks like the visibility checking isn't working on the CI and on your machine...
I checked that in the HTML for this one:
It's visible exactly once but somehow on CI and your machines it doesn't care about that/do the visibility checking correctly.
So... I mean it could be race condition or maybe the css doesn't work as it should or what not...
Also tried a fresh clone, all works for me.
PragTob commentedon Sep 6, 2020
deactivating the
visible: trueleads to exactly the same errors (unsurprisingly) just no idea why or how:PragTob commentedon Sep 6, 2020
I'm starting to think that the JS is probably not working and I'm not sure why....
cbxCloseis from the modal that should open when a link is clicked... so I guess it's not clicked.At this point maybe the assets are messed up or the the driver doesn't execute JS... I'm not sure. I confirmed google chrome is installed and apparition is configured... let's see.
I think I'm taking a break for now
tycooon commentedon Sep 7, 2020
Just a little note: I see that CI uses ubuntu-latest and I guess it got updated on October, 22 (see https://wiki.ubuntu.com/Releases).
PragTob commentedon Sep 7, 2020
Good thinking but October 22 hasn't passed yet and ubuntu-latest refers to 18.04 apparently even 🤔 tried explicit 20.04 and 18.04, nothing works. At this point rewriting the class selectors to be unique among visible/not visible might be the safest bet to long term resolve this but that's quite some work I'm not quite sure I got the head space for right now :|
no idea why when or how it happened... there were a couple of failures on
mainbut those are different :(tycooon commentedon Sep 7, 2020
Oops, I somehow messed October and August :( Sorry about that.
PragTob commentedon Sep 7, 2020
you're on the right track though, theoretically it could have been only some package update but which one, why or how is... fun to debug with me being unable to reproduce.
I could try the work mac for another data point...
tycooon commentedon Sep 7, 2020
Yeah, must be some update. Maybe Chrome?
PragTob commentedon Sep 7, 2020
Yeah... I can't quite figure it out. It seems somewhat most likely as that's one of the places where we differ as I'm not using chrome but chromium, difference shouldn't be big but still... :|
PragTob commentedon Sep 8, 2020
well at least i can reproduce now on a machine... no time to fix right now
.
the puma error is local, but the local duplications also happen... yayy macs
PragTob commentedon Sep 8, 2020
grml I thought I checked issues but now upon re checking I find twalpole/apparition#64 which is the likely cause
deivid-rodriguez commentedon Sep 8, 2020
Ha! I realize I might've run into the same thing in other repository, but I reverted the base docker image to the last working version and didn't dig further.
I guess an easy test we can do is revert b0d8826 and upgrade to the latest cuprite to see if the issues I had with it when migrating to Github Actions are now fixed. That would be the third switch we make because of issues with the alternative 😆.
PragTob commentedon Sep 8, 2020
😁
yeah my action item for today/tomorrow or so is to try and switch to cuprite that's one of the recommended workarounds for the time being.
Switch to cuprite to avoid failures with new Chrome
tycooon commentedon Sep 22, 2020
Hi, a little update on the issue. Currently things got better, but I still get 1 test randomly failing in main branch: https://github.com/umbrellio/simplecov/runs/1148966104?check_suite_focus=true
Note that this is not specific to jruby since it also sometimes fail in MRI as well :(
PragTob commentedon Sep 22, 2020
This is... very weird. Unless the error message is wrong:
If you look at the code:
simplecov/features/step_definitions/html_steps.rb
Lines 24 to 32 in c1a7e7d
this means that
expected_files.lengthis0to my interpretation. And that definitely should not be flaky as that's just the hash from the cucumber scenario...tycooon commentedon Sep 22, 2020
Actually expectation is on the wrong side there, it should look like this:
I already fixed that in my branch since it's really confusing :)
PragTob commentedon Sep 23, 2020
ah right the thing in expect is the actual not the expected... yeah that makes more sense. I hope I can give it another look this evening. It looks a bit scary as that might be further visibility shenanigans like I was facing with other browsers. Hopefully it's just a timing issue which I should be able to fix
PragTob commentedon Sep 23, 2020
It's interesting... because we see the groups for one of the 2 examples but then don't see the source files... which is very strange.
PragTob commentedon Oct 20, 2020
In the mean time this seems to have been resolved.. mostly
PragTob commentedon Oct 25, 2020
Some of the tests are still semi randomly failing like this one:
PragTob commentedon Oct 25, 2020
#939 begrudgingly itnroduces a retry to ward this off.
tycooon commentedon Oct 27, 2020
At least this makes it possible to submit a PR, thanks!
sferik commentedon Mar 28, 2026
I’m going to close this as stale. For what it’s worth, tests have been passing for me both locally and in CI. Feel free to reopen this issue or open a new one if this issue reoccurs.