Issue #3782 has been updated by Paul Berry.

Category set to testing
Status changed from Accepted to Ready for Testing
Assignee set to Paul Berry
Target version changed from queued to Statler
% Done changed from 0 to 100
Branch set to http://github.com/stereotype441/puppet/tree/ticket/next/3782

The test in question (test_parse_line) was nondeterministic because it was 
relying on the sort order of a Hash whose keys were symbols.  When the sort 
order caused a blank line to appear at the end of the file under test, the 
blank line was elided by the crontab parser, causing a failure.

Modified the test to execute in a deterministic order that doesn't place the 
blank line at the end.

----------------------------------------
Bug #3782: Test isolation problem in test/ral/providers/cron/crontab.rb
http://projects.puppetlabs.com/issues/3782

Author: Markus Roberts
Status: Ready for Testing
Priority: Low
Assignee: Paul Berry
Category: testing
Target version: Statler
Affected version: development
Keywords: 
Branch: http://github.com/stereotype441/puppet/tree/ticket/next/3782


The following failure seems to come and go with code changes that should have 
no effect on it apart from test execution order.  It does not occur with the 
test is run allone.

<pre>
  1) Failure:
test_parse_line(TestCronParsedProvider)
    [./ral/providers/cron/crontab.rb:76:in `assert_record_equal'
     ./ral/providers/cron/crontab.rb:123:in `test_parse_line'
     ./ral/providers/cron/crontab.rb:122:in `each'
     ./ral/providers/cron/crontab.rb:122:in `test_parse_line'
     
/Library/Ruby/Gems/1.8/gems/mocha-0.9.7/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in
 `__send__'
     
/Library/Ruby/Gems/1.8/gems/mocha-0.9.7/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in
 `run']:
not an instance of a hash in record for {:line=>"", :record_type=>:blank} in 
full match.
<nil> expected to be an instance of
<Hash> but was
<NilClass>.
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to