Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 7156935

Browse files
pmenonapavlo
authored andcommitted
Fix index tests to create unique-key indexes for unique-key tests. Fixed UniqueKeyDeleteTest to check correct keys.
1 parent 8a461bf commit 7156935

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/index/testing_index_util.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void TestingIndexUtil::UniqueKeyInsertTest(const IndexType index_type) {
104104

105105
// INDEX
106106
std::unique_ptr<index::Index, void (*)(index::Index *)> index(
107-
TestingIndexUtil::BuildIndex(index_type, false), DestroyIndex);
107+
TestingIndexUtil::BuildIndex(index_type, true), DestroyIndex);
108108
const catalog::Schema *key_schema = index->GetKeySchema();
109109

110110
// Single threaded test
@@ -151,10 +151,10 @@ void TestingIndexUtil::UniqueKeyDeleteTest(const IndexType index_type) {
151151

152152
key0->SetValue(0, type::ValueFactory::GetIntegerValue(100), pool);
153153
key0->SetValue(1, type::ValueFactory::GetVarcharValue("a"), pool);
154-
key2->SetValue(0, type::ValueFactory::GetIntegerValue(100), pool);
155-
key2->SetValue(1, type::ValueFactory::GetVarcharValue("b"), pool);
156154
key1->SetValue(0, type::ValueFactory::GetIntegerValue(100), pool);
157-
key1->SetValue(1, type::ValueFactory::GetVarcharValue("c"), pool);
155+
key1->SetValue(1, type::ValueFactory::GetVarcharValue("b"), pool);
156+
key2->SetValue(0, type::ValueFactory::GetIntegerValue(100), pool);
157+
key2->SetValue(1, type::ValueFactory::GetVarcharValue("c"), pool);
158158

159159
LOG_DEBUG("INDEX CONTENTS:\n%s",
160160
index::IndexUtil::Debug(index.get()).c_str());
@@ -278,7 +278,7 @@ void TestingIndexUtil::UniqueKeyMultiThreadedTest(const IndexType index_type) {
278278

279279
// INDEX
280280
std::unique_ptr<index::Index, void (*)(index::Index *)> index(
281-
TestingIndexUtil::BuildIndex(index_type, false), DestroyIndex);
281+
TestingIndexUtil::BuildIndex(index_type, true), DestroyIndex);
282282
const catalog::Schema *key_schema = index->GetKeySchema();
283283

284284
// Parallel Test

0 commit comments

Comments
 (0)