Skip to content
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

Internal Query: Adds In Memory Testing #2102

Closed
wants to merge 5 commits into from

Conversation

bchong95
Copy link
Contributor

@bchong95 bchong95 commented Jan 4, 2021

Internal Query: Adds In Memory Testing

Description

This PR adds the ability to test queries in memory. It achieves this by wiring up the InMemoryContainer as the query source and mocks the request pipeline. We start by taking the user's query and sending it to ServiceInterop to get the query plan. From there we create a pipeline that uses InMemoryContainer as the datasource. The results are then drained using different execution modes ({client, compute} x {with state, without state}) and cross referenced for correctness. The result is also cross referenced with QueryOracle for correctness.

The idea for this PR is that we should be able to test end to end query scenarios without the need for an emulator. This will reduce the time it takes the gates to run and also remove flakiness. For deployments there is an implementation of the base testing class that calls into the actual CosmosClient, so we can be sure that everything works in production. These tests will be slower to run, but only need to be run during deployments.

@j82w
Copy link
Contributor

j82w commented Sep 15, 2021

Memory benchmark tests already added as part of PR: #2676

@j82w j82w closed this Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants