Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void setup(Method method) throws Exception {
primaryHost = pulsar.getWebServiceAddress();

// create cluster metadata
ClusterData clusterData = ClusterData.builder().serviceUrl(urlTls.toString()).build();
ClusterData clusterData = ClusterData.builder().serviceUrlTls(urlTls.toString()).build();
admin.clusters().createCluster(config.getClusterName(), clusterData);

ClientBuilder clientBuilder = PulsarClient.builder()
Expand Down Expand Up @@ -308,14 +308,30 @@ && isNotBlank(workerConfig.getBrokerClientAuthenticationParameters())) {
void shutdown() throws Exception {
try {
log.info("--- Shutting down ---");
fileServer.stop();
pulsarClient.close();
admin.close();
pulsar.close();
bkEnsemble.stop();
if (fileServer != null) {
fileServer.stop();
fileServer = null;
}
if (pulsarClient != null) {
pulsarClient.close();
pulsarClient = null;
}
if (admin != null) {
admin.close();
admin = null;
}
if (pulsar != null) {
pulsar.close();
pulsar = null;
}
if (bkEnsemble != null) {
bkEnsemble.stop();
bkEnsemble = null;
}
} finally {
if (tempDirectory != null) {
tempDirectory.delete();
tempDirectory = null;
}
}
}
Expand Down Expand Up @@ -1099,7 +1115,7 @@ public void testPulsarSinkStatsByteBufferType() throws Throwable {
public void testPulsarSinkWithFunction() throws Throwable {
testPulsarSinkLocalRun(null, 1, StatsNullSink.class.getName(), "builtin://exclamation", "org.apache.pulsar.functions.api.examples.RecordFunction");
}

public static class TestErrorSink implements Sink<byte[]> {
private Map config;
@Override
Expand Down