Navigation Menu

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

failing test with v0.4.7 on OS X Mountain Lion with ruby 1.9.3p194 #48

Closed
levinalex opened this issue Jul 2, 2012 · 4 comments
Closed
Labels

Comments

@levinalex
Copy link

Hi,

I get a failing test on v0.4.7 (b1ba3dd)

Is this expected?

$ bundle exec rake
....
  1) Listen::Adapters::Darwin it should behave like an adapter that call properly listener#on_change single file operations when a file is moved given a directory with subdirectories detects files movements between subdirectories
     Failure/Error: listener.should_receive(:on_change).once.with do |array, options|
       (Mock Listen::Listener).on_change(no args)
           expected: 1 time
           received: 0 times
     Shared Example Group: "an adapter that call properly listener#on_change" called from ./spec/listen/adapters/darwin_spec.rb:11
     # ./spec/support/adapter_helper.rb:385:in `block (6 levels) in <top (required)>'

this is on:

$ uname -a
Darwin auri.fritz.box 12.0.0 Darwin Kernel Version 12.0.0: Fri Jun 22 20:01:10 PDT 2012; root:xnu-2050.7.7~1/RELEASE_X86_64 x86_64
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]
@levinalex
Copy link
Author

I have some difficulty pinning this down.

Turns out tests are only failing some of the time, and which tests are failing changes as well.

running with a constant seed rspec --seed 62067 produces this failure in roughly 10% of test runs:

Failures:

  1) Listen::Adapters::Darwin it should behave like an adapter that call properly listener#on_change single file operations when a file is deleted given a directory with subdirectories detects the file removal
     Failure/Error: listener.should_receive(:on_change).once.with(["#{path}/a_directory/subdirectory"], {})
       (Mock Listen::Listener).on_change(["/Users/levin/projects/listen/spec/.fixtures/13412528238702024270/a_directory/subdirectory"], {})
           expected: 1 time
           received: 0 times
     Shared Example Group: "an adapter that call properly listener#on_change" called from ./spec/listen/adapters/darwin_spec.rb:11
     # ./spec/support/adapter_helper.rb:463:in `block (6 levels) in <top (required)>'

Finished in 55.42 seconds
234 examples, 1 failure

Failed examples:

rspec ./spec/support/adapter_helper.rb:458 # Listen::Adapters::Darwin it should behave like an adapter that call properly listener#on_change single file operations when a file is deleted given a directory with subdirectories detects the file removal

Randomized with seed 62067

@levinalex
Copy link
Author

seed 8329 seems to produce different failures.

$ rspec --seed 8329
...

Failures:

  1) Listen::Adapters::Darwin it should behave like an adapter that call properly listener#on_change single file operations when a file is created given a directory with subdirectories detects the added file
     Failure/Error: listener.should_receive(:on_change).once.with(["#{path}/a_directory/subdirectory"], {})
       (Mock Listen::Listener).on_change(["/Users/levin/projects/listen/spec/.fixtures/134125631990846428937/a_directory/subdirectory"], {})
           expected: 1 time
           received: 0 times
     Shared Example Group: "an adapter that call properly listener#on_change" called from ./spec/listen/adapters/darwin_spec.rb:11
     # ./spec/support/adapter_helper.rb:157:in `block (6 levels) in <top (required)>'

Finished in 54.67 seconds
234 examples, 1 failure

Failed examples:

rspec ./spec/support/adapter_helper.rb:152 # Listen::Adapters::Darwin it should behave like an adapter that call properly listener#on_change single file operations when a file is created given a directory with subdirectories detects the added file

Randomized with seed 8329

@thibaudgg
Copy link
Member

Thanks for the report @levinalex I'll have a look at that when I'll upgrade to Mountain Lion (early august I think).

@thibaudgg
Copy link
Member

Works fine on Mountain Lion (10.8.2) and last ruby (1.9.3-p374) for me.

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