20
20
21
21
import static org .testng .Assert .assertEquals ;
22
22
import static org .testng .Assert .assertNotNull ;
23
+ import static org .testng .Assert .assertNull ;
23
24
24
25
import com .google .common .io .Resources ;
25
26
import com .google .common .collect .Sets ;
@@ -254,9 +255,7 @@ protected void setup() throws Exception {
254
255
.brokerClientTlsTrustStoreType (keyStoreType )
255
256
.build ());
256
257
admin4 .clusters ().createCluster (cluster4 , ClusterData .builder ()
257
- .serviceUrl (url4 .toString ())
258
258
.serviceUrlTls (urlTls4 .toString ())
259
- .brokerServiceUrl (pulsar4 .getBrokerServiceUrl ())
260
259
.brokerServiceUrlTls (pulsar4 .getBrokerServiceUrlTls ())
261
260
.brokerClientTlsEnabled (true )
262
261
.brokerClientCertificateFilePath (clientCertFilePath )
@@ -279,9 +278,20 @@ protected void setup() throws Exception {
279
278
assertEquals (admin2 .clusters ().getCluster (cluster1 ).getServiceUrl (), url1 .toString ());
280
279
assertEquals (admin2 .clusters ().getCluster (cluster2 ).getServiceUrl (), url2 .toString ());
281
280
assertEquals (admin2 .clusters ().getCluster (cluster3 ).getServiceUrl (), url3 .toString ());
281
+ assertNull (admin2 .clusters ().getCluster (cluster4 ).getServiceUrl ());
282
282
assertEquals (admin2 .clusters ().getCluster (cluster1 ).getBrokerServiceUrl (), pulsar1 .getBrokerServiceUrl ());
283
283
assertEquals (admin2 .clusters ().getCluster (cluster2 ).getBrokerServiceUrl (), pulsar2 .getBrokerServiceUrl ());
284
284
assertEquals (admin2 .clusters ().getCluster (cluster3 ).getBrokerServiceUrl (), pulsar3 .getBrokerServiceUrl ());
285
+ assertNull (admin2 .clusters ().getCluster (cluster4 ).getBrokerServiceUrl ());
286
+
287
+ assertEquals (admin2 .clusters ().getCluster (cluster1 ).getServiceUrlTls (), urlTls1 .toString ());
288
+ assertEquals (admin2 .clusters ().getCluster (cluster2 ).getServiceUrlTls (), urlTls2 .toString ());
289
+ assertEquals (admin2 .clusters ().getCluster (cluster3 ).getServiceUrlTls (), urlTls3 .toString ());
290
+ assertEquals (admin2 .clusters ().getCluster (cluster4 ).getServiceUrlTls (), urlTls4 .toString ());
291
+ assertEquals (admin2 .clusters ().getCluster (cluster1 ).getBrokerServiceUrlTls (), pulsar1 .getBrokerServiceUrlTls ());
292
+ assertEquals (admin2 .clusters ().getCluster (cluster2 ).getBrokerServiceUrlTls (), pulsar2 .getBrokerServiceUrlTls ());
293
+ assertEquals (admin2 .clusters ().getCluster (cluster3 ).getBrokerServiceUrlTls (), pulsar3 .getBrokerServiceUrlTls ());
294
+ assertEquals (admin2 .clusters ().getCluster (cluster4 ).getBrokerServiceUrlTls (), pulsar4 .getBrokerServiceUrlTls ());
285
295
286
296
// Also create V1 namespace for compatibility check
287
297
admin1 .clusters ().createCluster ("global" , ClusterData .builder ()
0 commit comments