vert-x3 / vertx-config

Vert.x Configuration Service
Apache License 2.0
54 stars 64 forks source link

Run ConfigMapStore.get()/close() on context #25

Closed gsson closed 6 years ago

gsson commented 6 years ago

I'm running a ConfigRetriever before I deploy any Verticles in order get their configuration before I start them.

When running a ConfigRetriever.create(vertx, configRetrieverOptions); with a configmap store I see messages like

2017-11-14 11:21:43,012 WARN [vert.x-eventloop-thread-0] Reusing a connection with a different context: an HttpClient is probably shared between different Verticles

in the logs every scanPeriod.

A similar issue was fixed in vertx-consul-client#35, and applying the same pattern to ConfigMapStore made the warnings go away.

I did not run the close() method on the context, should that be a thing?

cescoffier commented 6 years ago

Hi, thanks!

Yes, close should also be run on the context.

gsson commented 6 years ago

@cescoffier: Added commit for running close() on context.

I'm also having issues running all the vertx-config tests locally. vertx-config-git tests in particular -- I suspect those tests are wrong, possibly the code as well; I'll open an issue (#26), but I probably can't provide a fix right now

cescoffier commented 6 years ago

Thanks!