@@ -71,7 +71,7 @@ abstract class BaseAdminIntegrationTest extends IntegrationTestHarness with Logg
71
71
72
72
@ Test
73
73
def testCreateDeleteTopics (): Unit = {
74
- client = Admin .create(createConfig)
74
+ client = createAdminClient
75
75
val topics = Seq (" mytopic" , " mytopic2" , " mytopic3" )
76
76
val newTopics = Seq (
77
77
new NewTopic (" mytopic" , Map ((0 : Integer ) -> Seq [Integer ](1 , 2 ).asJava, (1 : Integer ) -> Seq [Integer ](2 , 0 ).asJava).asJava),
@@ -163,7 +163,7 @@ abstract class BaseAdminIntegrationTest extends IntegrationTestHarness with Logg
163
163
164
164
@ Test
165
165
def testAuthorizedOperations (): Unit = {
166
- client = Admin .create(createConfig)
166
+ client = createAdminClient
167
167
168
168
// without includeAuthorizedOperations flag
169
169
var result = client.describeCluster
@@ -226,12 +226,17 @@ abstract class BaseAdminIntegrationTest extends IntegrationTestHarness with Logg
226
226
val config = new util.HashMap [String , Object ]
227
227
config.put(AdminClientConfig .BOOTSTRAP_SERVERS_CONFIG , bootstrapServers())
228
228
config.put(AdminClientConfig .REQUEST_TIMEOUT_MS_CONFIG , " 20000" )
229
- val securityProps : util.Map [Object , Object ] =
230
- adminClientSecurityConfigs(securityProtocol, trustStoreFile, clientSaslProperties)
231
- securityProps.forEach { (key, value) => config.put(key.asInstanceOf [String ], value) }
229
+ config.put(AdminClientConfig .DEFAULT_API_TIMEOUT_MS_CONFIG , " 40000" )
232
230
config
233
231
}
234
232
233
+ def createAdminClient : Admin = {
234
+ val props = new Properties ()
235
+ props.putAll(createConfig)
236
+ val client = createAdminClient(configOverrides = props)
237
+ client
238
+ }
239
+
235
240
def waitForTopics (client : Admin , expectedPresent : Seq [String ], expectedMissing : Seq [String ]): Unit = {
236
241
waitUntilTrue(() => {
237
242
val topics = client.listTopics.names.get()
0 commit comments