[GitHub] incubator-quickstep pull request #312: Fixed a flaky case in Catalog test.

2017-10-09 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-quickstep/pull/312


---


[GitHub] incubator-quickstep pull request #312: Fixed a flaky case in Catalog test.

2017-10-09 Thread hbdeshmukh
Github user hbdeshmukh commented on a diff in the pull request:

https://github.com/apache/incubator-quickstep/pull/312#discussion_r143515729
  
--- Diff: catalog/tests/Catalog_unittest.cpp ---
@@ -552,13 +552,15 @@ TEST_F(CatalogTest, CatalogIndexTest) {
   IndexSubBlockDescription index_description;
   index_description.set_sub_block_type(IndexSubBlockDescription::CSB_TREE);
   
index_description.add_indexed_attribute_ids(rel->getAttributeByName("attr_idx1")->getID());
+  IndexSubBlockDescription index_description_copy;
+  index_description_copy.MergeFrom(index_description);
 
   EXPECT_TRUE(rel->addIndex("idx1", std::move(index_description)));
   EXPECT_TRUE(rel->hasIndexWithName("idx1"));
   // Adding an index with duplicate name should return false.
   EXPECT_FALSE(rel->addIndex("idx1", std::move(index_description)));
--- End diff --

By the same logic, we should create another copy for this move instruction. 


---


[GitHub] incubator-quickstep pull request #312: Fixed a flaky case in Catalog test.

2017-10-08 Thread zuyu
GitHub user zuyu opened a pull request:

https://github.com/apache/incubator-quickstep/pull/312

Fixed a flaky case in Catalog test.

This small PR fixes a flaky test case of adding an index with a different 
name, but the same description. However, the adding description is empty due to 
previous move semantics.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zuyu/incubator-quickstep fix-catalog-test

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-quickstep/pull/312.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #312


commit 45744d4d30f61183602aa64aeda4ae0cc02556f9
Author: Zuyu Zhang 
Date:   2017-10-08T19:20:41Z

Fixed a flaky case in Catalog test.




---