You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out you have to have to wait many more minutes than I was doing
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.
The SSL connection could not be established
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.
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.
Nope. It takes several minutes to start even when the container is downloaded.
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.
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.
I also had to configure things as below to avoid the TLS errors:
builder.UseCosmos(cosmosConnectionString,"collection",(configure)=>{// Override options to allow insecure connection to self-signed TLS certificate// in the CosmosDB test container. See https://stackoverflow.com/a/77973619/1064169.configure.ConnectionMode(Microsoft.Azure.Cosmos.ConnectionMode.Gateway).LimitToEndpoint().HttpClientFactory(()=>{varhandler=newHttpClientHandler(){ServerCertificateCustomValidationCallback=HttpClientHandler.DangerousAcceptAnyServerCertificateValidator,};returnnew(handler);});
I think the ideal thing here would be the new Cosmos Linux-based emulator, still in preview; that emulator seems ideal for this kind of thing. Unfortunately, it's still in early stages and does not yet support enough functionality to be used in the EF provider tests. Hopefully that'll change in the future.
Activity
ajcvickers commentedon Feb 29, 2024
Tried this, but the following code
just hangsonStartAsync.Turns out you have to have to wait many more minutes than I was doing.
ajcvickers commentedon Feb 29, 2024
Next issue:
Giving up on this for now.
roji commentedon Feb 29, 2024
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.
ajcvickers commentedon Feb 29, 2024
Nope. It takes several minutes to start even when the container is downloaded.
Good to know.
roji commentedon Feb 29, 2024
Wow, that's super weird. I wonder why.
ajcvickers commentedon Feb 29, 2024
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.
roji commentedon Feb 29, 2024
Several minutes, really? I don't think it was like that for me when I last tried it...
ajcvickers commentedon Feb 29, 2024
Okay, I timed it, and my perception is a little off, but it's still very slow:
roji commentedon Feb 29, 2024
Yeah, 48 seconds is unacceptable for test startup... That definitely seems like a lot...
SilverioMiranda commentedon Aug 28, 2024
Same for me
smolesen commentedon Oct 15, 2025
Did anyone find a solution for this?
martincostello commentedon Nov 6, 2025
On my laptop it takes about a 30 seconds or so to start up once docker has pulled the image. I was able to reduce it by configuring less partitions:
I also had to configure things as below to avoid the TLS errors:
roji commentedon Nov 6, 2025
I think the ideal thing here would be the new Cosmos Linux-based emulator, still in preview; that emulator seems ideal for this kind of thing. Unfortunately, it's still in early stages and does not yet support enough functionality to be used in the EF provider tests. Hopefully that'll change in the future.
KrFriis commentedon Jan 20, 2026
@martincostello you just saved me from more hours of regret and tears. Thank you
roji commentedon Apr 20, 2026
Done in #37999