@@ -1624,17 +1624,19 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest {
16241624 client = createAdminClient
16251625
16261626 val existingTopic = new ConfigResource (ConfigResource .Type .TOPIC , topic)
1627- client.describeConfigs(Collections .singletonList (existingTopic)).values.get(existingTopic).get()
1627+ client.describeConfigs(util. List .of (existingTopic)).values.get(existingTopic).get()
16281628
1629- val nonExistentTopic = new ConfigResource (ConfigResource .Type .TOPIC , " unknown" )
1630- val describeResult1 = client.describeConfigs(Collections .singletonList(nonExistentTopic))
1629+ val defaultTopic = new ConfigResource (ConfigResource .Type .TOPIC , " " )
1630+ var describeResult = client.describeConfigs(util.List .of(defaultTopic))
1631+ assertFutureThrows(classOf [InvalidTopicException ], describeResult.all())
16311632
1632- assertTrue(assertThrows(classOf [ExecutionException ], () => describeResult1.values.get(nonExistentTopic).get).getCause.isInstanceOf [UnknownTopicOrPartitionException ])
1633+ val nonExistentTopic = new ConfigResource (ConfigResource .Type .TOPIC , " unknown" )
1634+ describeResult = client.describeConfigs(util.List .of(nonExistentTopic))
1635+ assertFutureThrows(classOf [UnknownTopicOrPartitionException ], describeResult.all())
16331636
16341637 val invalidTopic = new ConfigResource (ConfigResource .Type .TOPIC , " (invalid topic)" )
1635- val describeResult2 = client.describeConfigs(Collections .singletonList(invalidTopic))
1636-
1637- assertTrue(assertThrows(classOf [ExecutionException ], () => describeResult2.values.get(invalidTopic).get).getCause.isInstanceOf [InvalidTopicException ])
1638+ describeResult = client.describeConfigs(util.List .of(invalidTopic))
1639+ assertFutureThrows(classOf [InvalidTopicException ], describeResult.all())
16381640 }
16391641
16401642 @ Test
0 commit comments