Skip to content

Commit f358ce4

Browse files
committed
Format producer termination tests
1 parent 03661b0 commit f358ce4

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

tests/ProducerTest.cc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ TEST(ProducerTest, testBacklogQuotasExceeded) {
216216
}
217217

218218
TEST(ProducerTest, testCreateProducerAfterTopicTermination) {
219-
const auto topicName =
220-
"testCreateProducerAfterTopicTermination-" + std::to_string(time(nullptr));
219+
const auto topicName = "testCreateProducerAfterTopicTermination-" + std::to_string(time(nullptr));
221220
const auto topic = "persistent://public/default/" + topicName;
222221

223222
Client client(serviceUrl, ClientConfiguration().setOperationTimeoutSeconds(1));
@@ -238,8 +237,7 @@ TEST(ProducerTest, testCreateProducerAfterTopicTermination) {
238237
}
239238

240239
TEST(ProducerTest, testSendAfterTopicTerminationReconnect) {
241-
const auto topicName =
242-
"testSendAfterTopicTerminationReconnect-" + std::to_string(time(nullptr));
240+
const auto topicName = "testSendAfterTopicTerminationReconnect-" + std::to_string(time(nullptr));
243241
const auto topic = "persistent://public/default/" + topicName;
244242

245243
Client client(serviceUrl, ClientConfiguration().setOperationTimeoutSeconds(1));
@@ -253,11 +251,10 @@ TEST(ProducerTest, testSendAfterTopicTerminationReconnect) {
253251
ASSERT_EQ(200, httpCode) << "httpCode: " << httpCode;
254252

255253
PulsarFriend::getProducerImpl(producer).disconnectProducer();
256-
ASSERT_TRUE(waitUntil(std::chrono::seconds(3),
257-
[&producer] { return PulsarFriend::isTerminated(producer); }));
254+
ASSERT_TRUE(
255+
waitUntil(std::chrono::seconds(3), [&producer] { return PulsarFriend::isTerminated(producer); }));
258256

259-
ASSERT_EQ(ResultTopicTerminated,
260-
producer.send(MessageBuilder().setContent("after-terminate").build()));
257+
ASSERT_EQ(ResultTopicTerminated, producer.send(MessageBuilder().setContent("after-terminate").build()));
261258

262259
client.close();
263260
}

0 commit comments

Comments
 (0)