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

Test failures #253

Closed
a-m-s opened this issue Jun 7, 2017 · 3 comments
Closed

Test failures #253

a-m-s opened this issue Jun 7, 2017 · 3 comments
Labels

Comments

@a-m-s
Copy link

a-m-s commented Jun 7, 2017

I currently get two test failures:

Failures:

  1) a wrapped widget initialized before sourcing the plugin executes the custom behavior and the built-in behavior
     Failure/Error: wait_for { session.content }.to eq('foobar')
     
       expected: "foobar"
            got: "foodar"
     
       (compared using ==)
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:13:in `block (2 levels) in handle_matcher'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:10:in `loop'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:10:in `block in handle_matcher'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:9:in `handle_matcher'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:30:in `block in to'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:44:in `block in with_wait'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:28:in `with_wait'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:44:in `with_wait'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:30:in `to'
     # ./spec/integrations/wrapped_widget_spec.rb:18:in `block (4 levels) in <top (required)>'
     # ./spec/spec_helper.rb:31:in `with_history'
     # ./spec/integrations/wrapped_widget_spec.rb:16:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:17:in `block (2 levels) in <top (required)>'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # Timeout::Error:
     #   execution expired
     #   ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:16:in `sleep'

  2) a wrapped widget initialized after sourcing the plugin executes the custom behavior and the built-in behavior
     Failure/Error: wait_for { session.content }.to eq('foobar')
     
       expected: "foobar"
            got: "foodar"
     
       (compared using ==)
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:13:in `block (2 levels) in handle_matcher'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:10:in `loop'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:10:in `block in handle_matcher'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:9:in `handle_matcher'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:30:in `block in to'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:44:in `block in with_wait'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:28:in `with_wait'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:44:in `with_wait'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/target.rb:30:in `to'
     # ./spec/integrations/wrapped_widget_spec.rb:35:in `block (4 levels) in <top (required)>'
     # ./spec/spec_helper.rb:31:in `with_history'
     # ./spec/integrations/wrapped_widget_spec.rb:33:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:17:in `block (2 levels) in <top (required)>'
     # ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # Timeout::Error:
     #   execution expired
     #   ./tmphome/.gem/ruby/2.4.0/gems/rspec-wait-0.0.9/lib/rspec/wait/handler.rb:16:in `sleep'

This is on Arch Linux with Zsh 5.3.1.

I run the tests in a blank (fake) $HOME that contains only the necessary Ruby Gems. You can see the script in the PKGBUILD at https://aur.archlinux.org/packages/zsh-autosuggestions-git/

@a-m-s
Copy link
Author

a-m-s commented Dec 7, 2017

I'm still seeing these failures.

@ericfreese
Copy link
Member

ericfreese commented May 15, 2018

These tests have always passed for me and on CI. Not sure why they are failing for you, but on develop branch I've added a new attach! method to the TerminalSession class that will attach to the current tmux session. You can add a binding.pry to the offending tests, run them, and when the pry prompt appears, run session.attach!. You'll be dropped into the tmux session that the test is running and can poke around to figure out what might be going wrong.

Hope that helps!

@a-m-s
Copy link
Author

a-m-s commented May 22, 2018

The tests no longer fail:

a wrapped widget
  initialized before sourcing the plugin
    executes the custom behavior and the built-in behavior
  initialized after sourcing the plugin
    executes the custom behavior and the built-in behavior

I have no idea what would have fixed it; there must have been 1000 OS updates since December.

@a-m-s a-m-s closed this as completed May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants