Add get/query offset wrappers

This commit is contained in:
Matias Fontanini
2016-06-05 18:14:46 -07:00
parent 65a60f1690
commit 7708e945b7
6 changed files with 72 additions and 18 deletions

View File

@@ -14,6 +14,7 @@ using std::string;
using std::thread;
using std::set;
using std::mutex;
using std::tie;
using std::condition_variable;
using std::lock_guard;
using std::unique_lock;
@@ -131,6 +132,12 @@ TEST_F(ConsumerTest, AssignmentCallback) {
assignment = consumer.get_assignment();
EXPECT_EQ(3, assignment.size());
int64_t low;
int64_t high;
tie(low, high) = consumer.get_offsets(KAFKA_TOPIC, partition);
EXPECT_GT(high, low);
EXPECT_EQ(high, runner.get_messages().back().get_offset() + 1);
}
TEST_F(ConsumerTest, Rebalance) {