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

Improve Explain-related tests #521

Closed
AndrewSisley opened this issue Jun 13, 2022 · 0 comments · Fixed by #949
Closed

Improve Explain-related tests #521

AndrewSisley opened this issue Jun 13, 2022 · 0 comments · Fixed by #949
Assignees
Labels
area/query Related to the query component area/testing Related to any test or testing suite refactor This issue specific to or requires *notable* refactoring of existing codebases and components

Comments

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Jun 13, 2022

Explain related tests fail too easily and encourage the changing of them. They should be modified to separate the testing of the explain functionality, from tests asserting node-specific behaviour (e.g. joins doing their thing). Node-specific tests should be able to assert specific elements in the explain graph without having to assert the full graph.

Lots of discussion on this in discord thread 'Explain tests' (https://discord.com/channels/427944769851752448/985958152845537350).

@AndrewSisley AndrewSisley added area/query Related to the query component area/testing Related to any test or testing suite refactor This issue specific to or requires *notable* refactoring of existing codebases and components labels Jun 13, 2022
@AndrewSisley AndrewSisley added this to the DefraDB v0.4 milestone Jun 13, 2022
@shahzadlone shahzadlone self-assigned this Jun 13, 2022
shahzadlone added a commit that referenced this issue Nov 27, 2022
- Resolves #521

- Description:
This PR adds the testing setup for the `explain` feature to be more flexible and easier to manage going forward.

This new setup will handle all explain types: `simple`, `debug`, `execute`, `predict`.

The PR introduces three different types of test cases for asserting the results from an `explain` request. These can be asserted in one test case or smaller separate cases:
1) Being able to assert full explain graph or just quickly see the full graph to debug (like before).
2) Only matching the plan node ordering.
3) Targeting specific attributes only (option to also select their children nodes, or just it's attributes)
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
)

- Resolves sourcenetwork#521

- Description:
This PR adds the testing setup for the `explain` feature to be more flexible and easier to manage going forward.

This new setup will handle all explain types: `simple`, `debug`, `execute`, `predict`.

The PR introduces three different types of test cases for asserting the results from an `explain` request. These can be asserted in one test case or smaller separate cases:
1) Being able to assert full explain graph or just quickly see the full graph to debug (like before).
2) Only matching the plan node ordering.
3) Targeting specific attributes only (option to also select their children nodes, or just it's attributes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query Related to the query component area/testing Related to any test or testing suite refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants