simplified setup because dropping a collection already drops the indices for you

This commit is contained in:
Jim Menard 2009-02-06 10:57:34 -05:00
parent 1061a42c81
commit 0faf693801
1 changed files with 2 additions and 14 deletions

View File

@ -23,23 +23,11 @@ def check_keys(c, expected)
end
if $DEBUG
begin
index_names = x.index_information.collect { |info| info[:name] }
x.drop_index('field1_1') if index_names.include?('field1_1')
x.drop_index('field2_1') if index_names.include?('field2_1')
x.drop
rescue => ex
end
x.drop # also drops indexes
x.insert('field1' => 'f1', 'field2' => 'f2')
x.create_index('field1_1', 'field1')
x.create_index('field2_1', 'field2')
begin
index_names = y.index_information.collect { |info| info[:name] }
y.drop_index('abc') if index_names.include?('abc')
y.drop_index('d') if index_names.include?('d')
y.drop
rescue => ex
end
y.drop
end
# There should only be two indices on x, and none on y. We raise an error if