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

[#4851] fix: make TestHiveTableOperations setup independently #4857

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Sep 5, 2024

What changes were proposed in this pull request?

TestHiveTableOperations can be tested before TestHiveTable initialized.
Make TestHiveTableOperations::steup() run alone.

Why are the changes needed?

When we try to just run gradle :catalogs:catalog-hive:test --tests 'org.apache.gravitino.catalog.hive.TestHiveTableOperations', TestHiveTableOperations needs static variables which must be initialized ahead, and it can't be run alone.

Fix: #4851

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Refactor of unit test setup, local unit tests have passed.

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[#123] feat(operator): support xxx"
     - "[#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

`TestHiveTableOperations` can be tested before `TestHiveTable`
initialized.
Make `TestHiveTableOperations::steup()` run alone.

### Why are the changes needed?

When we try to just run `gradle :catalogs:catalog-hive:test --tests
'org.apache.gravitino.catalog.hive.TestHiveTableOperations'`,
`TestHiveTableOperations` needs static variables which must be
initialized ahead, and it can't be run alone.

Fix: #4851 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Refactor of unit test setup, local unit tests have passed.
@github-actions github-actions bot requested a review from jerryshao September 5, 2024 02:49
@yuqi1129 yuqi1129 closed this Sep 5, 2024
@yuqi1129 yuqi1129 reopened this Sep 5, 2024
@jerryshao jerryshao closed this Sep 5, 2024
@jerryshao jerryshao reopened this Sep 5, 2024
@jerryshao jerryshao merged commit 25e13ba into branch-0.6 Sep 5, 2024
38 of 56 checks passed
@jerryshao jerryshao deleted the cherry-pick-branch-0.6-e1df6937172efce7d7af4904b8d1f419c33d6b39 branch September 5, 2024 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants