Azure / azure-cosmos-db-emulator-docker

This repo serves as hub for managing issues, gathering feedback, and having discussions regarding the Cosmos DB Emulator Docker.
https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux%2Ccsharp&pivots=api-nosql
MIT License
165 stars 47 forks source link

unable to use linux emulator together with dotnet testrunner (net6) #51

Open svenna opened 2 years ago

svenna commented 2 years ago

we have tried for several days to get a stable execution environment for system tests with the cosmosdb linux emulator We have tried to run the emulator in ubuntu-18.04 devops pipelines as well as on wsl2 ubuntu linux.

It seems like the emulator starts up fine, we have been able to run the dotnet core test program as well as a small program written to test both EntityFramwork Core access as well as direct cosmosdb client access. But our unittests and systemtests that are executed via dotnet test fails consistently, most of the time we get 408 timeout but we can also get 503 (especially after a few 408). We run the test against a newly created cosmosdb container to make sure that we have as well defined environment as possible. we also remove and adds the new certificate (we see ssl failures if we don't update the cert)

Is there differences between running dotnet run vs dotnet test that can explain the issues we see?

christian-be commented 2 years ago

I'm experiencing the same issues with the linux container (ubuntu 18.04 agent). did you find a solution for this problem?

aaronzhongg commented 1 year ago

I've been experiencing similar problems with the ubuntu 18.04 agents, I observed after increasing the partition count and throughput on the container that the 408 Request Timeout and 503 Unavailable errors seemed to happen less frequently, but still not reliable enough to use in for our development.

@svenna @christian-be, what did you guys end up doing?

At this stage, we're unable to use the linux emulator until this is resolved

Edit: We've gone with using the Cosmos DB Emulator running natively on windows and finding it to be reliable locally as well as on the Azure Pipeline windows agents