diff options
author | Luke Kanies <luke@madstop.com> | 2008-12-14 22:42:16 -0600 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-12-15 19:27:45 +1100 |
commit | b966ea02a9deeb947bd6153c4cd7c53b1ddff3d8 (patch) | |
tree | c9d39dde3fe1530fede77ca60cacec240519a562 /test/util | |
parent | 1f34bcac626d57e4bc8cbc3476a6e41319a6533e (diff) | |
download | puppet-b966ea02a9deeb947bd6153c4cd7c53b1ddff3d8.tar.gz puppet-b966ea02a9deeb947bd6153c4cd7c53b1ddff3d8.tar.xz puppet-b966ea02a9deeb947bd6153c4cd7c53b1ddff3d8.zip |
Modifying the corruption-checking test.
It is now more likely to fail if there's a problem,
since the yaml should be corrupt, causing a yaml failure.
Also removing the equivalent test from the Storage module.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test/util')
-rwxr-xr-x | test/util/storage.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/test/util/storage.rb b/test/util/storage.rb index 5634a94f6..d3860d6d7 100755 --- a/test/util/storage.rb +++ b/test/util/storage.rb @@ -63,30 +63,6 @@ class TestStorage < Test::Unit::TestCase assert_equal(state["name"], hash) end - # we're getting corrupt files, probably because multiple processes - # are reading or writing the file at once - # so we need to test that - def test_multiwrite - f = mkfile() - - value = {:a => :b} - threads = [] - 9.times { |a| - threads << Thread.new { - 9.times { |b| - assert_nothing_raised { - Puppet::Util::Storage.load - state = Puppet::Util::Storage.cache(f) - value.each { |k,v| state[k] = v } - state[:e] = rand(100) - Puppet::Util::Storage.store - } - } - } - } - threads.each { |th| th.join } - end - def test_emptyrestore Puppet::Util::Storage.load Puppet::Util::Storage.store |