summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-12-14 22:42:16 -0600
committerJames Turnbull <james@lovedthanlost.net>2008-12-15 19:27:45 +1100
commitb966ea02a9deeb947bd6153c4cd7c53b1ddff3d8 (patch)
treec9d39dde3fe1530fede77ca60cacec240519a562 /spec/integration
parent1f34bcac626d57e4bc8cbc3476a6e41319a6533e (diff)
downloadpuppet-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 'spec/integration')
-rwxr-xr-xspec/integration/util/file_locking.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/integration/util/file_locking.rb b/spec/integration/util/file_locking.rb
index 171c57a5b..f8e21ed6e 100755
--- a/spec/integration/util/file_locking.rb
+++ b/spec/integration/util/file_locking.rb
@@ -11,7 +11,7 @@ describe Puppet::Util::FileLocking do
file = file.path
File.open(file, "w") { |f| f.puts "starting" }
- value = {:a => :b}
+ data = {:a => :b, :c => "A string", :d => "another string", :e => %w{an array of strings}}
threads = []
sync = Sync.new
9.times { |a|
@@ -19,13 +19,13 @@ describe Puppet::Util::FileLocking do
9.times { |b|
sync.synchronize(Sync::SH) {
Puppet::Util::FileLocking.readlock(file) { |f|
- f.read
+ YAML.load(f.read)
}
}
sleep 0.01
sync.synchronize(Sync::EX) {
Puppet::Util::FileLocking.writelock(file) { |f|
- f.puts "%s %s" % [a, b]
+ f.puts YAML.dump(data)
}
}
}