@@ -8254,11 +8254,9 @@ class KafkaApisTest extends Logging {
8254
8254
}
8255
8255
8256
8256
@ParameterizedTest
8257
- @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH)
8257
+ // We only test with topic ids.
8258
+ @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH, fromVersion = 10)
8258
8259
def testHandleOffsetFetchWithUnknownTopicIds(version: Short): Unit = {
8259
- // We only test with topic ids.
8260
- if (version < 10) return
8261
-
8262
8260
val foo = "foo"
8263
8261
val bar = "bar"
8264
8262
val fooId = Uuid.randomUuid()
@@ -8399,11 +8397,9 @@ class KafkaApisTest extends Logging {
8399
8397
}
8400
8398
8401
8399
@ParameterizedTest
8402
- @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH)
8400
+ // The single group builder does not support topic ids.
8401
+ @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH, toVersion = 9)
8403
8402
def testHandleOffsetFetchWithSingleGroup(version: Short): Unit = {
8404
- // The single group builder does not support topic ids.
8405
- if (version >= 10) return
8406
-
8407
8403
def makeRequest(version: Short): RequestChannel.Request = {
8408
8404
buildRequest(new OffsetFetchRequest.Builder(
8409
8405
"group-1",
@@ -8476,12 +8472,10 @@ class KafkaApisTest extends Logging {
8476
8472
}
8477
8473
8478
8474
@ParameterizedTest
8479
- @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH)
8475
+ // Version 1 does not support fetching all offsets request. We are not
8476
+ // interested in testing these here.
8477
+ @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH, fromVersion = 2)
8480
8478
def testHandleOffsetFetchAllOffsetsWithSingleGroup(version: Short): Unit = {
8481
- // Version 1 does not support fetching all offsets request. We are not
8482
- // interested in testing these here.
8483
- if (version < 2) return
8484
-
8485
8479
val foo = "foo"
8486
8480
val fooId = Uuid.randomUuid()
8487
8481
addTopicToMetadataCache(foo, topicId = fooId, numPartitions = 2)
@@ -8571,11 +8565,9 @@ class KafkaApisTest extends Logging {
8571
8565
}
8572
8566
8573
8567
@ParameterizedTest
8574
- @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH)
8568
+ // We don't test the non batched API.
8569
+ @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH, fromVersion = 8)
8575
8570
def testHandleOffsetFetchAuthorization(version: Short): Unit = {
8576
- // We don't test the non batched API.
8577
- if (version < 8) return
8578
-
8579
8571
val foo = "foo"
8580
8572
val bar = "bar"
8581
8573
val fooId = Uuid.randomUuid()
@@ -8767,11 +8759,9 @@ class KafkaApisTest extends Logging {
8767
8759
}
8768
8760
8769
8761
@ParameterizedTest
8770
- @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH)
8762
+ // We don't test the non batched API.
8763
+ @ApiKeyVersionsSource(apiKey = ApiKeys.OFFSET_FETCH, fromVersion = 8)
8771
8764
def testHandleOffsetFetchWithUnauthorizedTopicAndTopLevelError(version: Short): Unit = {
8772
- // We don't test the non batched API.
8773
- if (version < 8) return
8774
-
8775
8765
val foo = "foo"
8776
8766
val bar = "bar"
8777
8767
val fooId = Uuid.randomUuid()
0 commit comments