Background
The functional test infrastructure boots a local Atlas container via TestContainers when neither ATLAS_URI nor MONGODB_URI is set (tests/MongoDB.EntityFrameworkCore.FunctionalTests/Utilities/). This same code was ported into the mongodb/mongo-mevd-provider repo and subsequently hardened in mongo-mevd-provider#2. The improvements made there should be ported back here.
The container-readiness logic is relevant to CI robustness: the readiness probe waits for the Atlas Search Index Management service to come up, and an unbounded startup wait can hang the run (rather than fail cleanly) when that service is unavailable — the same Error connecting to Search Index Management service condition that has surfaced in the Test Atlas GitHub workflow.
Changes to make
1. MongoDbAtlasBuilder.cs — readiness probe (WaitIndicateReadiness)
- Scope the probe's catch to MongoException/TimeoutException instead of a bare {{catch { }}}, so genuinely unexpected exceptions propagate instead of being silently retried forever.
- Add ConfigureAwait(false) to the awaits in the probe.
2. TestContainersTestServer.cs — container startup
- Wrap _container.StartAsync(...) in a CancellationTokenSource with a ~5-minute timeout so a stuck readiness probe fails fast instead of hanging the run indefinitely.
- Dispose the container on a failed start (and dispose any leftover container before allocating a new one), then rethrow.
Out of scope
The remainder of the mevd PR (MongoTestStore.cs vector/full-text index lifecycle, $listSearchIndexes polling, model reflection, dependency bumps, dependabot config) is VectorData-conformance-specific and not applicable to the EF provider, which has its own index tests (Storage/IndexTests.cs).