localstack-java-utils icon indicating copy to clipboard operation
localstack-java-utils copied to clipboard

When not using elasticsearch, the port is still binded during unit test

Open feguiguren opened this issue 4 years ago • 2 comments

In my test, I only use S3 service, with this annotation:

@ExtendWith(LocalstackDockerExtension.class) @LocalstackDockerProperties( portEdge = "4577", services = {"s3"}, hostNameResolver = HostResolver.class)

I configured the edge port because I have multiple tests running on the same runner at the same time, but they fail because the elasticsearch port is already binded by another test suite.

[error] docker: Error response from daemon: driver failed programming external connectivity on endpoint hopeful_fermi (a98226257cb706ef22f296a7cb04d3b0ce148d1f013f251f57dd38a9c2cfe668): Bind for 0.0.0.0:4571 failed: port is already allocated.

If I am not using elastic search, I think the port should not be in use.

feguiguren avatar Jun 04 '21 16:06 feguiguren

Thanks much for this suggestion @feguiguren - makes perfect sense. Please note that this repo is more community-driven, and less actively maintained by the LocalStack core maintainers. Do you think you'd be able to create a pull request for this fix? Thanks for your help!

whummer avatar Jun 17 '21 22:06 whummer

Hi! We just wanted to follow up on our last message to see whether your issue has been resolved. Were you able to get it working with the latest version of LocalStack? We would appreciate your feedback!

lakkeger avatar Nov 14 '23 07:11 lakkeger