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

Support multi-document transactions on the MongoDB image

Open mervyn-mccreight opened this issue 2 years ago • 1 comments

According to the documentation in the testcontainers-java equivalent multi-document transactions are only supported for a replica-set.

To support this we need to Initialize a single replica set after container-start up and wait for the completion of the initialization.

This is useful if you want to test code that makes use of transactions, as far as I know it does not work otherwise.

mervyn-mccreight avatar Feb 24 '22 18:02 mervyn-mccreight

Is it possible to do this via a client - outside of testcontainers - once the container is started?

thomaseizinger avatar Mar 09 '22 06:03 thomaseizinger

Bumping. Is this theoretically possible for testcontainers to do?

clarkmcc avatar Jan 20 '23 22:01 clarkmcc

As far as I know it should be possible yes. At least using mongosh you can do it.

mervyn-mccreight avatar Mar 03 '23 23:03 mervyn-mccreight

We will be removing all images from this library, see https://github.com/testcontainers/testcontainers-rs/issues/471.

thomaseizinger avatar Mar 08 '23 17:03 thomaseizinger