test/BTree_spec.rb in perobs-4.0.0 vs test/BTree_spec.rb in perobs-4.1.0
- old
+ new
@@ -25,17 +25,20 @@
require 'fileutils'
require 'spec_helper'
require 'perobs/BTree'
+require 'perobs/ProgressMeter'
describe PEROBS::BTree do
before(:all) do
@db_dir = generate_db_name('BTree')
FileUtils.mkdir_p(@db_dir)
- @m = PEROBS::BTree.new(@db_dir, 'btree', 11)
+ @m = PEROBS::BTree.new(@db_dir, 'btree', 11, PEROBS::ProgressMeter.new)
+ PEROBS.log.level = Logger::ERROR
+ PEROBS.log.open($stderr)
end
after(:all) do
FileUtils.rm_rf(@db_dir)
end
@@ -126,10 +129,10 @@
end
it 'should survive a real-world usage test' do
@m.clear
ref = {}
- 0.upto(50000) do
+ 0.upto(20000) do
case rand(5)
when 0
0.upto(2) do
key = rand(100000)
value = rand(10000000)