Skip to content

test: Fixes intermittent test failure related to CosmosDB #8660

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

nopcoder
Copy link
Contributor

@nopcoder nopcoder commented Feb 16, 2025

Closes #8659

  • Updated the TestCosmosDB function to include t.Helper() for better test helper function behavior.
  • Improved error logging to include raw response data for better debugging.
  • Added new environment variables for the CosmosDB emulator to disable data persistence and rate limiting.
  • Captured and logged the CosmosDB emulator container output for better debugging.
  • Refactored the HTTP client initialization only once.

@nopcoder nopcoder added area/testing Improvements or additions to tests exclude-changelog PR description should not be included in next release changelog area/KV Improvements to the KV store implementation labels Feb 16, 2025
@nopcoder nopcoder requested a review from itaiad200 February 16, 2025 09:42
@nopcoder nopcoder self-assigned this Feb 16, 2025
Copy link

github-actions bot commented Feb 16, 2025

E2E Test Results - Quickstart

12 passed

Copy link

github-actions bot commented Feb 16, 2025

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed, 1 skipped

@nopcoder nopcoder force-pushed the chore/test-cosmosdb branch from dd4cea6 to 9bf455d Compare February 16, 2025 10:02
@nopcoder nopcoder changed the title test: limit kv test on cosmosdb on windows only test: kv test cosmosdb increase timeout while waiting for container Feb 16, 2025
- No magic numbers
- Adjusted the client timeout to 30 seconds for the CosmosDB client in the main_test.go file.
- Updated the client configuration in the cosmosdb.go file to include a timeout of 5 seconds.
@nopcoder nopcoder removed the request for review from itaiad200 February 16, 2025 14:19
@nopcoder nopcoder changed the title test: kv test cosmosdb increase timeout while waiting for container test: Fixes intermittent test failure related to CosmosDB Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/KV Improvements to the KV store implementation area/testing Improvements or additions to tests exclude-changelog PR description should not be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing using CosmosDB Emulator fails sometimes
1 participant