mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Fix test condition in file adapter cncurrency spec
Previously, we have counted successivly equal lines. However, we want to count the number of lines with different content to ensure proper concurrency during the test.
This commit is contained in:
parent
e21108b7c2
commit
d609c2409a
@ -169,7 +169,7 @@ describe Rackstash::Adapters::File do
|
||||
# Ensure that not all lines are written sequentially by the same worker,
|
||||
# i.e. there were concurrent writes by multiple workers.
|
||||
expect(
|
||||
File.new(logfile.path).each_line.each_cons(2).count { |l1, l2| l1.to_s[0] == l2.to_s[0] }
|
||||
File.new(logfile.path).each_line.each_cons(2).count { |l1, l2| l1.to_s[0] != l2.to_s[0] }
|
||||
).to be > workers
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user