Skip to content

Commit 4efd61a

Browse files
authored
cleanup(bigtable): remove duplicate test (#6400)
1 parent 91da5f3 commit 4efd61a

1 file changed

Lines changed: 3 additions & 30 deletions

File tree

google/cloud/bigtable/table_sample_row_keys_test.cc

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TableSampleRowKeysTest
3636
TableSampleRowKeysTest() : TableTestFixture(CompletionQueue{}) {}
3737
};
3838

39-
/// @test Verify that Table::SampleRows<T>() works for default parameter.
39+
/// @test Verify that Table::SampleRows() works.
4040
TEST_F(TableSampleRowKeysTest, DefaultParameterTest) {
4141
namespace btproto = ::google::bigtable::v2;
4242

@@ -64,34 +64,7 @@ TEST_F(TableSampleRowKeysTest, DefaultParameterTest) {
6464
EXPECT_EQ(++it, result->end());
6565
}
6666

67-
/// @test Verify that Table::SampleRows<T>() works for std::vector.
68-
TEST_F(TableSampleRowKeysTest, SimpleVectorTest) {
69-
namespace btproto = ::google::bigtable::v2;
70-
71-
EXPECT_CALL(*client_, SampleRowKeys).WillOnce([](Unused, Unused) {
72-
auto reader = absl::make_unique<MockSampleRowKeysReader>(
73-
"google.bigtable.v2.Bigtable.SampleRowKeys");
74-
EXPECT_CALL(*reader, Read)
75-
.WillOnce([](btproto::SampleRowKeysResponse* r) {
76-
{
77-
r->set_row_key("test1");
78-
r->set_offset_bytes(11);
79-
}
80-
return true;
81-
})
82-
.WillOnce(Return(false));
83-
EXPECT_CALL(*reader, Finish()).WillOnce(Return(grpc::Status::OK));
84-
return reader;
85-
});
86-
auto result = table_.SampleRows();
87-
ASSERT_STATUS_OK(result);
88-
auto it = result->begin();
89-
EXPECT_NE(it, result->end());
90-
EXPECT_EQ(it->row_key, "test1");
91-
EXPECT_EQ(it->offset_bytes, 11);
92-
EXPECT_EQ(++it, result->end());
93-
}
94-
67+
/// @test Verify that Table::SampleRows() retries when unavailable.
9568
TEST_F(TableSampleRowKeysTest, SampleRowKeysRetryTest) {
9669
namespace btproto = ::google::bigtable::v2;
9770

@@ -151,7 +124,7 @@ TEST_F(TableSampleRowKeysTest, SampleRowKeysRetryTest) {
151124
}
152125

153126
#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS
154-
/// @test Verify that Table::sample_rows() reports correctly on too many errors.
127+
/// @test Verify that Table::SampleRows() reports correctly on too many errors.
155128
TEST_F(TableSampleRowKeysTest, TooManyFailures) {
156129
namespace btproto = ::google::bigtable::v2;
157130

0 commit comments

Comments
 (0)