Azure / Azure/data-api-builder

Create and reuse a single instance of CosmosClient in Cosmos integration tests

Open
#756 0 comments 0 reactions 1 assignee Assigned to @sourabh1007 View on GitHub
cosmos refactor testing
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

At the moment, the Cosmos integration tests create a new instance of the CosmosClient for performing operations (such as creating collection, inserting items, etc.) on the cosmos DB. The documentation recommends creating a single instance for the lifetime of the application. Refactoring the tests to create a single instance and re-use that could be an enhancement to the existing cosmos integration tests.

Documentation Link: [Azure Cosmos DB Performance Docs](https://docs.microsoft.com/en-us/azure/cosmos-db/sql/performance-tips?tabs=trace-net-core)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.