Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ subprojects {

test {
maxParallelForks = userMaxForks ?: Runtime.runtime.availableProcessors()
ignoreFailures = userIgnoreFailures

minHeapSize = "256m"
maxHeapSize = "2048m"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import org.apache.kafka.common.requests.ProduceResponse.PartitionResponse
import org.apache.kafka.common.utils.Utils
import org.apache.kafka.common.KafkaException
import org.easymock.{Capture, EasyMock, IAnswer}
import org.junit.Assert.{assertEquals, assertFalse, assertNull, assertTrue, assertThrows}
import org.junit.Assert.{assertEquals, assertFalse, assertNull, assertTrue}
import org.junit.{Before, Test}
import org.scalatest.Assertions.fail

Expand Down Expand Up @@ -912,9 +912,13 @@ class GroupMetadataManagerTest {
// reset the position to the starting position 0 so that it can read the data in correct order
groupMetadataRecordValue.position(0)

val e = assertThrows(classOf[KafkaException],
() => GroupMetadataManager.readGroupMessageValue(groupId, groupMetadataRecordValue, time))
assertEquals(s"Unknown group metadata version ${unsupportedVersion}", e.getMessage)
try {
GroupMetadataManager.readGroupMessageValue(groupId, groupMetadataRecordValue, time)
fail("Expected KafkaException here")
} catch {
case e: KafkaException => assertEquals(s"Unknown group metadata version ${unsupportedVersion}", e.getMessage)
case _ => fail("Expected KafkaException here")
}
}

@Test
Expand Down