diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-11-18 13:21:35 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-11-18 14:55:05 -0800 |
commit | cf18353472ce9c4e51157d21882a7f129853fd10 (patch) | |
tree | c31ee9be07ffa97c1ec1ada8d4a090afc51506cd /test | |
parent | ee56cfd01fce154da38d5f251f66c495b2013b5d (diff) | |
download | puppet-cf18353472ce9c4e51157d21882a7f129853fd10.tar.gz puppet-cf18353472ce9c4e51157d21882a7f129853fd10.tar.xz puppet-cf18353472ce9c4e51157d21882a7f129853fd10.zip |
Maint: Switched spec tests to use a class rather than Array as the log destination.
Using an Array as a log destination is unreliable because Puppet's log
mechanism stores log destinations in a hash whose key is the
destination itself. Since arrays can change their hash when they are
modified, this was causing the log destination hash to become
corrupted, producing sporadic spec test failures.
Diffstat (limited to 'test')
-rwxr-xr-x | test/lib/puppettest.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb index 0b3a89a72..a60092cf7 100755 --- a/test/lib/puppettest.rb +++ b/test/lib/puppettest.rb @@ -185,7 +185,7 @@ module PuppetTest #if rake? or ! Puppet[:debug] #if defined?($puppet_debug) or ! rake? Puppet[:color] = false if textmate? - Puppet::Util::Log.newdestination(@logs) + Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs)) if defined? $console Puppet.info @method_name Puppet::Util::Log.newdestination(:console) @@ -305,7 +305,7 @@ module PuppetTest def logstore @logs = [] - Puppet::Util::Log.newdestination(@logs) + Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs)) end end |