Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete unit tests for bigtable::Table::ReadModifyWrite() #304

Closed
coryan opened this issue Mar 7, 2018 · 2 comments
Closed

Complete unit tests for bigtable::Table::ReadModifyWrite() #304

coryan opened this issue Mar 7, 2018 · 2 comments
Assignees
Labels
api: bigtable Issues related to the Bigtable API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@coryan
Copy link
Member

coryan commented Mar 7, 2018

Add the tests missing in #303, including all ReadModifyWriteRules and multiple ReadModifyWriteRules in a single operation.

@hemant-qlogic
Copy link
Contributor

hemant-qlogic commented Mar 18, 2018

Did not understand what is missing here. We have test cases for AppendValue(), IncrementAmount().
Do I need to add test case for using multiple IncrementAmount() in a test case as follows.

TEST(ReadModifyWriteRuleTest, MultipleIncrementAmount) {
  auto const proto =  bigtable::ReadModifyWriteRule::IncrementAmount("fam", "col", 52)
                                    .IncrementAmount("fam", "col", 10).as_proto();
  EXPECT_EQ(btproto::ReadModifyWriteRule::kIncrementAmount, proto.rule_case());
  EXPECT_EQ(62, proto.increment_amount());
  EXPECT_EQ("fam", proto.family_name());
  EXPECT_EQ("col", proto.column_qualifier());
}

This test case always fails as it returns the fresh ReadModifyWriteRule object.
Please suggest what is remaining in this.

@coryan
Copy link
Member Author

coryan commented Mar 18, 2018

Yes, testing with multiple values would be useful. Also, you want the mock to return a proto Row with multiple cells and test that the output has what you expect. That would have caught the problems fixed in #351 .

hemant-qlogic added a commit to hemant-qlogic/google-cloud-cpp that referenced this issue Mar 23, 2018
@coryan coryan closed this as completed in 154947b Mar 23, 2018
roopak-qlogic pushed a commit to roopak-qlogic/google-cloud-cpp that referenced this issue Apr 1, 2018
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants