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

test: add fuzz tests for column data type alteration #4076

Merged
merged 7 commits into from
Jun 4, 2024

Conversation

realtaobo
Copy link
Contributor

@realtaobo realtaobo commented May 30, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#3973

What's changed and what's your intention?

Just add fuzz test for Alter Table <table_name> MODIFY COLUMN <column_name> <column_type>

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.

@realtaobo realtaobo requested a review from a team as a code owner May 30, 2024 12:41
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label May 30, 2024
@WenyXu
Copy link
Member

WenyXu commented May 30, 2024

Thanks! Would you like to add the target to CI cfg

target: [ "fuzz_create_table", "fuzz_alter_table", "fuzz_create_database", "fuzz_create_logical_table", "fuzz_alter_logical_table", "fuzz_insert", "fuzz_insert_logical_table" ]

and
target: [ "fuzz_create_table", "fuzz_alter_table", "fuzz_create_database", "fuzz_create_logical_table", "fuzz_alter_logical_table", "fuzz_insert", "fuzz_insert_logical_table" ]

Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 92.13483% with 7 lines in your changes missing coverage. Please review.

Project coverage is 85.17%. Comparing base (cd97a39) to head (c7bb216).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4076      +/-   ##
==========================================
- Coverage   85.47%   85.17%   -0.30%     
==========================================
  Files         991      991              
  Lines      173053   173141      +88     
==========================================
- Hits       147913   147470     -443     
- Misses      25140    25671     +531     

@realtaobo

This comment was marked as outdated.

@WenyXu
Copy link
Member

WenyXu commented May 30, 2024

@WenyXu It seems unnecessary. I added it to fuzz_alter_table as a part of alter table. What do you think?

Cool, I got you

BTW, it seems not work to read env var GT_MYSQL_ADDR form .env config file.

Interesting, it works on my machine.

If I don't set Environment variables,I got "GT_MYSQL_ADDR is empty, ignores test", even though I have a .env file int the root. How should I solve this problem?

What does the directory structure and .env file look like? (Don't submit any secrets)

@realtaobo
Copy link
Contributor Author

What does the directory structure and .env file look like? (Don't submit any secrets)

The content is the same as file .env.example, only GT_MYSQL_ADDR is changed to:

GT_MYSQL_ADDR=127.0.0.1:4002

@WenyXu
Copy link
Member

WenyXu commented May 30, 2024

The content is the same as file .env.example, only GT_MYSQL_ADDR is changed to:

I don't have any idea about this👀

@realtaobo
Copy link
Contributor Author

I don't have any idea about this👀

Got it, a little problem, maybe I should restart my machine 🐶

@WenyXu WenyXu requested review from evenyag and WenyXu May 31, 2024 14:43
tests-fuzz/targets/fuzz_alter_table.rs Outdated Show resolved Hide resolved
tests-fuzz/src/ir.rs Show resolved Hide resolved
tests-fuzz/src/context.rs Outdated Show resolved Hide resolved
@WenyXu
Copy link
Member

WenyXu commented Jun 3, 2024

We can't to close the #3973 now. We need to insert some values before the alteration and validate the inserted values after the alteration. However, it could be done in another PR.

@evenyag evenyag added this pull request to the merge queue Jun 4, 2024
Merged via the queue into GreptimeTeam:main with commit dd06e10 Jun 4, 2024
28 checks passed
@realtaobo realtaobo deleted the fuzz-alter branch June 5, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants