DeletApi error using Testcontainer module for Influxdb

Hi Guys,
I am using Testcontainers module for influxdb (Java) for my IT tests, everything seems to work well except using the deleteApi to drop series ( truncate in-between tests). it has a flaky behaviour

  • Works fine when you just run a test.
  • Outputs this error “Failed to connect to localhost/127.0.0.1:52491” when you try to run all tests.
    (ProxyAuthenticationRequiredException )

Managed to solve the issue apparently my test set up was spinning up a new influxdb container for each class being tested and the url for the influxdb client wasn’t updated so the delete api was calling through a port that was already destroyed hence the failed to connect error.

@williamxo Thanks for sharing your solution!