Skip to content

Commit

Permalink
[fix] Test was leaving client instance to null (apache#22631)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored May 1, 2024
1 parent 7daebaa commit a904863
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4329,10 +4329,6 @@ public static Object[] avroSchemaProvider() {
public void testAccessAvroSchemaMetadata(Schema<MyBean> schema) throws Exception {
log.info("-- Starting {} test --", methodName);

if (pulsarClient == null) {
pulsarClient = newPulsarClient(lookupUrl.toString(), 0);
}

final String topic = "persistent://my-property/my-ns/accessSchema";
Consumer<GenericRecord> consumer = pulsarClient.newConsumer(Schema.AUTO_CONSUME())
.topic(topic)
Expand Down Expand Up @@ -4382,7 +4378,7 @@ public void testAccessAvroSchemaMetadata(Schema<MyBean> schema) throws Exception
fail();
} finally {
pulsarClient.shutdown();
pulsarClient = null;
pulsarClient = newPulsarClient(lookupUrl.toString(), 0);
admin.schemas().deleteSchema(topic);
}
}
Expand Down

0 comments on commit a904863

Please sign in to comment.