testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

feat: allow reusing the reaper

Open jcmfernandes opened this issue 7 months ago • 1 comments

What does this PR do?

  1. Makes the session ID configurable, allowing for long-running sessions (the key change).
  2. Deletes config.go since everything inside was deprecated.
  3. Simplifies how unique session IDs are generated.

Regarding point 3, I must admit that I don't understand the advantages of the hashing logic I ended up deleting. I'm happy to revert it, though.

Why is it important?

Speaking of my use-case, Apache Pulsar takes a long time to boot, so I wanted testcontainers to bring it up, eventually take it down, but allow me to use the same container across several runs. This wasn't the case, since I was getting a new reaper running on every test run. I wanted a rolling-window behavior, hence this change.

Related issues

  • Closes #2804

Follow-ups

Update the documentation.

jcmfernandes avatar Mar 22 '25 13:03 jcmfernandes