Skip to content

Commit

Permalink
Drop useless msgCnt variables
Browse files Browse the repository at this point in the history
  • Loading branch information
g7ed6e committed Jul 31, 2024
1 parent 056bce2 commit e5552df
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ public void ConsumerBuilder_SetStatisticsHandler(string bootstrapServers)
{
consumer.Subscribe(singlePartitionTopic);

int msgCnt = 0;
while (true)
{
var record = consumer.Consume(TimeSpan.FromMilliseconds(100));
if (record == null) { continue; }
if (record.IsPartitionEOF) { break; }
msgCnt += 1;
}

Assert.True(mres1.Wait(TimeSpan.FromSeconds(5)));
Expand Down Expand Up @@ -218,12 +216,9 @@ public void ConsumerBuilder_SetErrorHandler(string bootstrapServers)
{
consumer.Subscribe(singlePartitionTopic);

int msgCnt = 0;
while (!errorHandler1Called && !errorHandler2Called)
{
var record = consumer.Consume(TimeSpan.FromMilliseconds(100));
if (record == null) { continue; }
msgCnt += 1;
consumer.Consume(TimeSpan.FromMilliseconds(100));
}

consumer.Close();
Expand Down

0 comments on commit e5552df

Please sign in to comment.