-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use testcontainer for testing Cosmos DB #33189
Comments
Tried this, but the following code var cosmosDbContainer = new CosmosDbBuilder()
.WithImage("mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest")
.Build();
await cosmosDbContainer.StartAsync(); Turns out you have to have to wait many more minutes than I was doing. |
Next issue:
Giving up on this for now. |
This was a first-time only thing, right? As the container image needs to be downloaded? In later runs the image is cached so things should start up very fast.
For this I imagine you need to configure the SDK to not validate the certificate - I made this change to our test suite in #25528, you can try copying that. |
Nope. It takes several minutes to start even when the container is downloaded.
Good to know. |
Wow, that's super weird. I wonder why. |
Starting the emulator on my machine takes a similar amount of time, so if it starts the emulator when the test container starts, then that would be why. |
Several minutes, really? I don't think it was like that for me when I last tried it... |
Okay, I timed it, and my perception is a little off, but it's still very slow:
|
Yeah, 48 seconds is unacceptable for test startup... That definitely seems like a lot... |
Same for me |
https://testcontainers.com/modules/cosmosdb/
The text was updated successfully, but these errors were encountered: