Skip to content

Commit 5df6df8

Browse files
committed
added disable indexes while restoring unit tests
1 parent 4e78a0d commit 5df6df8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/dump/reader_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,14 @@ def create_entry(rows_count)
478478
expect(@dump).to receive(:insert_into_table).with('`first`', '(`id`, `name`)', @rows.map(&:inspect))
479479
@dump.read_table('first', 100)
480480
end
481+
482+
it "should remove indexes around reading/writing table" do
483+
create_entry(100)
484+
allow(@dump).to receive(:clear_table)
485+
allow(@dump).to receive(:insert_into_table)
486+
expect(@dump).to receive(:with_disabled_indexes).with('first')
487+
@dump.read_table('first', 100)
488+
end
481489
end
482490
end
483491

0 commit comments

Comments
 (0)