On Tue, Apr 17, 2012 at 17:27, Jeff McCune <[email protected]> wrote:
> I'm working on fixing up a module and I've written a test that triggers the > bug against Puppet 2.7.x. I'm running into a problem where I get 0 failures > when I run `rake test` or `rspec --format d spec/` but I get the failure I'm > expecting if I run the spec file directly with > rspec spec/unit/application/describe_spec.rb > > Here's the gist of what's going on: > > https://gist.github.com/2410088 > > The code in question is: > > [1] https://github.com/jeffmccune/puppetlabs-mount-providers/tree/ticket/master/13070_fix_mounttab > > And Puppet 2.7.x > > What is a common case for this type of order dependent false positive, and > what are some strategies I can employ to be a bit more defensive about the > context my test is running in? Recent rspec supports an `--order random`, as well as `--order random:${seed}` which runs with a fixed seed. The random order prints the seed at the end; you can use that to shuffle the tests and help discover these. Sadly, Puppet doesn't fully pass with that option, and I have not yet finished purging them, so you will get some genuine but unconnected positives. You can have a cookie for fixing them along the way, though. ;) -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
