47
47
import org .apache .pulsar .common .policies .data .TenantInfoImpl ;
48
48
import org .apache .pulsar .common .policies .data .TopicType ;
49
49
import org .apache .pulsar .common .util .FutureUtil ;
50
+ import org .apache .pulsar .tests .TestRetrySupport ;
50
51
import org .apache .pulsar .zookeeper .LocalBookkeeperEnsemble ;
51
52
import org .awaitility .Awaitility ;
52
53
import org .testng .annotations .AfterClass ;
56
57
57
58
@ Test (groups = "broker-admin" )
58
59
@ Slf4j
59
- public class GetPartitionMetadataTest {
60
+ public class GetPartitionMetadataTest extends TestRetrySupport {
60
61
61
62
protected static final String DEFAULT_NS = "public/default" ;
62
63
@@ -72,8 +73,10 @@ public class GetPartitionMetadataTest {
72
73
protected PulsarClientImpl clientWithHttpLookup1 ;
73
74
protected PulsarClientImpl clientWitBinaryLookup1 ;
74
75
76
+ @ Override
75
77
@ BeforeClass (alwaysRun = true )
76
78
protected void setup () throws Exception {
79
+ incrementSetupNumber ();
77
80
bkEnsemble = new LocalBookkeeperEnsemble (3 , 0 , () -> 0 );
78
81
bkEnsemble .start ();
79
82
// Start broker.
@@ -85,8 +88,10 @@ protected void setup() throws Exception {
85
88
admin1 .namespaces ().createNamespace (DEFAULT_NS );
86
89
}
87
90
91
+ @ Override
88
92
@ AfterClass (alwaysRun = true )
89
93
protected void cleanup () throws Exception {
94
+ markCurrentSetupNumberCleaned ();
90
95
cleanupBrokers ();
91
96
if (bkEnsemble != null ) {
92
97
bkEnsemble .stop ();
@@ -236,7 +241,7 @@ public void testCompatibilityForNewClientAndOldBroker(TopicDomain topicDomain) t
236
241
String pulsarUrl = pulsar1 .getBrokerServiceUrl ();
237
242
PulsarClientImpl [] clients = getClientsToTest (false );
238
243
for (PulsarClientImpl client : clients ) {
239
- client .getLookup (pulsarUrl ).getBroker (TopicName .get (DEFAULT_NS + "/tp1" ));
244
+ client .getLookup (pulsarUrl ).getBroker (TopicName .get (DEFAULT_NS + "/tp1" )). join () ;
240
245
}
241
246
// Inject a not support flag into the connections initialized.
242
247
Field field = ClientCnx .class .getDeclaredField ("supportsGetPartitionedMetadataWithoutAutoCreation" );
0 commit comments