Fix BlockBasedTableTest.NoopTransformSeek failure

Summary:
table_test is failing because we are creating a temp InternalComparator

14:27:28 [ RUN      ] BlockBasedTableTest.NoopTransformSeek
14:27:28 pure virtual method called
14:27:28 terminate called without an active exception
14:27:28 /bin/sh: line 7: 2346261 Aborted                 (core dumped) ./$t

Test Plan: make table_test -j64 && ./table_test --gtest_filter="BlockBasedTableTest.NoopTransformSeek"

Reviewers: igor, sdong, anthony, rven

Reviewed By: rven

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D52671
This commit is contained in:
Islam AbdelRahman 2016-01-07 09:48:29 -08:00
parent 8c71eb5afc
commit f3fb39814d

View File

@ -1260,8 +1260,9 @@ TEST_F(BlockBasedTableTest, NoopTransformSeek) {
std::vector<std::string> keys;
stl_wrappers::KVMap kvmap;
const ImmutableCFOptions ioptions(options);
c.Finish(options, ioptions, table_options,
InternalKeyComparator(options.comparator), &keys, &kvmap);
const InternalKeyComparator internal_comparator(options.comparator);
c.Finish(options, ioptions, table_options, internal_comparator, &keys,
&kvmap);
auto* reader = c.GetTableReader();
for (int i = 0; i < 2; ++i) {