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

feat: integration test suite #487

Merged
merged 10 commits into from
Nov 22, 2022
Merged

feat: integration test suite #487

merged 10 commits into from
Nov 22, 2022

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Nov 14, 2022

Changes Included

Add a SQL integration test suites and a group of basic SQLs from "get started" document. This test suite only supports local standalone mode now.

To run it, use

cd tests/runner
cargo run

Notes

The dependency sqlness is not published, I'm discussing publish procedure with CeresDB authors (it is derived from there). When things done I'll update it to crates.io registry.

Known problem

  • The start command is cargo run -- datanode start, which may cause zombie process when closing. It should be run from the binary directly.

  • Due to the DROP TABLE clause is not supported now, tests cannot clear its state and will result to "table already exist" when re-run it.

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #487 (177b07e) into develop (62fcb54) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #487      +/-   ##
===========================================
- Coverage    86.41%   86.35%   -0.06%     
===========================================
  Files          400      401       +1     
  Lines        50671    50769      +98     
===========================================
+ Hits         43788    43843      +55     
- Misses        6883     6926      +43     
Flag Coverage Δ
rust 86.35% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/instance/distributed.rs 78.15% <0.00%> (-6.14%) ⬇️
src/frontend/src/table.rs 89.92% <0.00%> (-2.18%) ⬇️
src/datatypes/src/vectors/boolean.rs 89.76% <0.00%> (-0.71%) ⬇️
src/servers/src/opentsdb/codec.rs 98.93% <0.00%> (-0.36%) ⬇️
src/frontend/src/error.rs 8.92% <0.00%> (-0.34%) ⬇️
src/cmd/src/error.rs 93.05% <0.00%> (-0.28%) ⬇️
src/frontend/src/instance.rs 73.05% <0.00%> (-0.26%) ⬇️
src/table/src/table.rs 50.00% <0.00%> (ø)
src/storage/src/read/dedup.rs 100.00% <0.00%> (ø)
...rc/datatypes/src/vectors/operations/find_unique.rs 100.00% <0.00%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@waynexia waynexia marked this pull request as draft November 15, 2022 03:41
@waynexia waynexia added the WIP label Nov 17, 2022
@waynexia waynexia marked this pull request as ready for review November 17, 2022 16:03
@evenyag
Copy link
Contributor

evenyag commented Nov 18, 2022

Merging #487 (2031a73) into develop (a179481) will decrease coverage by 2.22%.

Maybe we could ignore this crate in codecov.yml, or you could try to rebase the latest develop branch.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 615 files.

Valid Invalid Ignored Fixed
520 3 92 0
Click to see the invalid file list
  • tests/runner/src/env.rs
  • tests/runner/src/main.rs
  • tests/runner/src/util.rs

tests/runner/src/env.rs Show resolved Hide resolved
tests/runner/src/main.rs Show resolved Hide resolved
tests/runner/src/util.rs Outdated Show resolved Hide resolved
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia added AFR and removed WIP labels Nov 21, 2022
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@evenyag
Copy link
Contributor

evenyag commented Nov 22, 2022

Maybe better to mention that we need to clean the data directory before runing test.

@waynexia
Copy link
Member Author

Maybe better to mention that we need to clean the data directory before runing test.

I plan to write a document in dev-guide to describe how to run and add integration test when this gets merged. I'll mention this here

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tests/runner/src/env.rs Outdated Show resolved Hide resolved
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@killme2008 killme2008 merged commit b407ebf into develop Nov 22, 2022
@killme2008 killme2008 deleted the integration-test branch November 22, 2022 07:34
@fengjiachun fengjiachun mentioned this pull request Dec 9, 2022
24 tasks
@fengjiachun fengjiachun added this to the v0.1 milestone Feb 15, 2023
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
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.

4 participants