-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix admin props failing on duration types #240
Conversation
...t-autoconfigure/src/main/java/org/springframework/pulsar/autoconfigure/PulsarProperties.java
Show resolved
Hide resolved
...t-autoconfigure/src/main/java/org/springframework/pulsar/autoconfigure/PulsarProperties.java
Show resolved
Hide resolved
...oconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarPropertiesTests.java
Show resolved
Hide resolved
if (conf.remove("connectTimeout") instanceof Duration connectTimeout) { | ||
builder.connectionTimeout((int) connectTimeout.toMillis(), TimeUnit.MILLISECONDS); | ||
|
||
// Workaround the fact that the PulsarAdminImpl does not attempt to construct the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to move this to PulsarAdminBuilderImpl.loadConf like we did for the auth stuff below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to merge this in order to get a 🟢 on the CI as I have a follow on PR to bump to SB3.0.0. Any PR suggestions I will gladly handle post-merge (cc: @cbornet ) |
map.from(this::getConnectionTimeout).asInt(Duration::toMillis).to(properties.in("connectionTimeoutMs")); | ||
map.from(this::getReadTimeout).asInt(Duration::toMillis).to(properties.in("readTimeoutMs")); | ||
map.from(this::getRequestTimeout).asInt(Duration::toMillis).to(properties.in("requestTimeoutMs")); | ||
map.from(this::getAutoCertRefreshTime).asInt(Duration::toMillis).to(properties.in("autoCertRefreshTimeMs")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For autoCertRefreshTime
we should convert to seconds.
PATL @cbornet @sobychacko
Fixes #239