Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
fix unit test error
Browse files Browse the repository at this point in the history
  • Loading branch information
gavingaozhangmin committed Nov 30, 2021
1 parent b832e3a commit f68f01c
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,22 @@ private static Authentication getAuth(ClientConfigurationData conf)
public static ClientConfigurationData newClientConf(String serviceUrl, Properties properties) {
Map<String, Object> clientConfData = getClientParams(Maps.fromProperties(properties));
ClientConfigurationData clientConf = new ClientConfigurationData();
clientConf = ConfigurationDataUtils.loadData(clientConfData, clientConf, ClientConfigurationData.class);
clientConf =
ConfigurationDataUtils.loadData(
clientConfData, clientConf, ClientConfigurationData.class);
clientConf.setServiceUrl(serviceUrl);
return clientConf;
}

public static Map<String, Object> getClientParams(Map<String, String> parameters) {
return parameters.keySet().stream()
.filter(k -> k.startsWith(PulsarOptions.PULSAR_CLIENT_OPTION_KEY_PREFIX))
.collect(Collectors.toMap(
k -> k.substring(PulsarOptions.PULSAR_CLIENT_OPTION_KEY_PREFIX.length()),
k -> parameters.get(k)));
.collect(
Collectors.toMap(
k ->
k.substring(
PulsarOptions.PULSAR_CLIENT_OPTION_KEY_PREFIX
.length()),
k -> parameters.get(k)));
}
}

0 comments on commit f68f01c

Please sign in to comment.