Details
Description
Uuid.ZERO_UUID == new Uuid(0L, 0L)
is true in scala, but in java is false.
So this test run sccessfully. Is this the expected situation??
@Test public void testTopicIdAndNullTopicNameRequests() { // Construct invalid MetadataRequestTopics. We will build each one separately and ensure the error is thrown. List<MetadataRequestData.MetadataRequestTopic> topics = Arrays.asList( new MetadataRequestData.MetadataRequestTopic().setName("topic").setTopicId(new Uuid(0L, 0L))); // if version is 10 or 11, the invalid topic metadata should return an error List<Short> invalidVersions = Arrays.asList((short) 10, (short) 11); invalidVersions.forEach(version -> topics.forEach(topic -> { MetadataRequestData metadataRequestData = new MetadataRequestData().setTopics(Collections.singletonList(topic)); MetadataRequest.Builder builder = new MetadataRequest.Builder(metadataRequestData); assertThrows(UnsupportedVersionException.class, () -> builder.build(version)); }) ); }
Attachments
Issue Links
- links to