Skip to content

Commit f71c97d

Browse files
rootroot
root
authored and
root
committed
KAFKA-18638 fix typo
1 parent 3fe47c7 commit f71c97d

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Diff for: core/src/test/scala/integration/kafka/api/BaseQuotaTest.scala

+15-15
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
9393
@ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumAndGroupProtocolNames)
9494
@MethodSource(Array("getTestQuorumAndGroupProtocolParametersAll"))
9595
def testThrottledProducerConsumer(quorum: String, groupProtocol: String): Unit = {
96-
val numRecords = 1000
97-
val produced = quotaTestClients.produceUntilThrottled(numRecords)
98-
assertTrue(produced < numRecords, "Produced records should less than max records")
96+
val maxRecords = 1000
97+
val produced = quotaTestClients.produceUntilThrottled(maxRecords)
98+
assertTrue(produced < maxRecords, "Produced records should less than max records")
9999
quotaTestClients.verifyProduceThrottle(expectThrottle = true)
100100

101101
// Consumer should read in a bursty manner and get throttled immediately
@@ -114,12 +114,12 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
114114
quotaTestClients.overrideQuotas(Long.MaxValue, Long.MaxValue, Long.MaxValue.toDouble)
115115
quotaTestClients.waitForQuotaUpdate(Long.MaxValue, Long.MaxValue, Long.MaxValue.toDouble)
116116

117-
val numRecords = 1000
118-
assertEquals(numRecords, quotaTestClients.produceUntilThrottled(numRecords))
117+
val maxRecords = 1000
118+
assertEquals(maxRecords, quotaTestClients.produceUntilThrottled(maxRecords))
119119
quotaTestClients.verifyProduceThrottle(expectThrottle = false)
120120

121121
// The "client" consumer does not get throttled.
122-
assertEquals(numRecords, quotaTestClients.consumeUntilThrottled(numRecords))
122+
assertEquals(maxRecords, quotaTestClients.consumeUntilThrottled(maxRecords))
123123
quotaTestClients.verifyConsumeThrottle(expectThrottle = false)
124124
}
125125

@@ -132,9 +132,9 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
132132
quotaTestClients.overrideQuotas(2000, 250, Long.MaxValue.toDouble)
133133
quotaTestClients.waitForQuotaUpdate(2000, 250, Long.MaxValue.toDouble)
134134

135-
val numRecords = 1000
136-
val produced = quotaTestClients.produceUntilThrottled(numRecords)
137-
assertTrue(produced < numRecords, "Produced records should less than max records")
135+
val maxRecords = 1000
136+
val produced = quotaTestClients.produceUntilThrottled(maxRecords)
137+
assertTrue(produced < maxRecords, "Produced records should less than max records")
138138
quotaTestClients.verifyProduceThrottle(expectThrottle = true)
139139

140140
// Consumer should be able to consume at least one record, even when throttled
@@ -149,24 +149,24 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
149149
quotaTestClients.overrideQuotas(Long.MaxValue, Long.MaxValue, Long.MaxValue.toDouble)
150150
quotaTestClients.waitForQuotaUpdate(Long.MaxValue, Long.MaxValue, Long.MaxValue.toDouble)
151151

152-
val numRecords = 1000
153-
assertEquals(numRecords, quotaTestClients.produceUntilThrottled(numRecords))
152+
val maxRecords = 1000
153+
assertEquals(maxRecords, quotaTestClients.produceUntilThrottled(maxRecords))
154154
quotaTestClients.verifyProduceThrottle(expectThrottle = false)
155-
assertEquals(numRecords, quotaTestClients.consumeUntilThrottled(numRecords))
155+
assertEquals(maxRecords, quotaTestClients.consumeUntilThrottled(maxRecords))
156156
quotaTestClients.verifyConsumeThrottle(expectThrottle = false)
157157

158158
// Delete producer and consumer quota overrides. Consumer and producer should now be
159159
// throttled since broker defaults are very small
160160
quotaTestClients.removeQuotaOverrides()
161161
quotaTestClients.waitForQuotaUpdate(defaultProducerQuota, defaultConsumerQuota, defaultRequestQuota)
162-
val produced = quotaTestClients.produceUntilThrottled(numRecords)
163-
assertTrue(produced < numRecords, "Produced records should less than max records")
162+
val produced = quotaTestClients.produceUntilThrottled(maxRecords)
163+
assertTrue(produced < maxRecords, "Produced records should less than max records")
164164
quotaTestClients.verifyProduceThrottle(expectThrottle = true)
165165

166166
// Since producer may have been throttled after producing a couple of records,
167167
// consume from beginning till throttled
168168
quotaTestClients.consumer.seekToBeginning(Collections.singleton(new TopicPartition(topic1, 0)))
169-
quotaTestClients.consumeUntilThrottled(numRecords + produced)
169+
quotaTestClients.consumeUntilThrottled(maxRecords + produced)
170170
quotaTestClients.verifyConsumeThrottle(expectThrottle = true)
171171
}
172172

0 commit comments

Comments
 (0)