Open AlexPlom opened 5 years ago
I can confirm this is an issue.
I did some additional investigation. If I use IDocumentClient.CreateDatabaseIfNotExistsAsync or IDocumentClient.CreateDatabaseAsync and attempt to connect to Cosmos DB local emulator but it is not installed, after 06m08s, it will finally throw "Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll". This should be almost immediate.
I am working on the Microsoft fhir server project at https://github.com/Microsoft/fhir-server/
Context: Local call to CosmosDb Emulator does not timeout
While testing what connectivity errors might occur during query execution, I stumbled upon a strange case, where the query is executed as such :
with GetAllResultsAsync() being:
And upon closing the Emulator, the request hangs and does not respond. For tests purposes, I have tried using the
ConnectionPolicy
for theDocumentClient
as such:This is not something that hinders our process in any way, but simply trying to figure out the behavior.
Steps to reproduce: Create a
DocumentClient
instance and before the execution of a query, stop the emulator.