Skip to content

Commit 5fa8bc0

Browse files
committed
Refine test KafkaRecoverableProducer.MockFatalError a bit
1 parent 90d2544 commit 5fa8bc0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/kafka/addons/KafkaRecoverableProducer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class KafkaRecoverableProducer
3131
{
3232
std::lock_guard<std::mutex> lock(_producerMutex);
3333

34-
_producer->close();
35-
3634
_running = false;
3735
if (_pollThread.joinable()) _pollThread.join();
36+
37+
_producer->close();
3838
}
3939

4040
/**

tests/integration/TestKafkaRecoverableProducer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ TEST(KafkaRecoverableProducer, MockFatalError)
133133
std::this_thread::sleep_for(std::chrono::milliseconds(1));
134134
}
135135
}
136+
EXPECT_EQ(sendCount, deliveryCount);
136137

137138
// Prepare a consumer
138139
const auto consumerProps = KafkaTestUtility::GetKafkaClientCommonConfig().put(kafka::clients::consumer::Config::AUTO_OFFSET_RESET, "earliest");

0 commit comments

Comments
 (0)