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 #4854

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

LindaSummer
Copy link
Contributor

@LindaSummer LindaSummer commented Sep 4, 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.

@LindaSummer LindaSummer changed the title [#4851] fix: make TestHiveTableOperations setup independent Sep 4, 2024
@jerryshao
Copy link
Contributor

@mchades would you please help to review the code?

Copy link
Contributor

@mchades mchades left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for your contributions!

@yuqi1129
Copy link
Contributor

yuqi1129 commented Sep 5, 2024

@mchades
Does this issue exist in branch-0.6?

@jerryshao
Copy link
Contributor

@mchades Does this issue exist in branch-0.6?

I think so. We can backport to branch-0.6.

@yuqi1129 yuqi1129 added the branch-0.6 Automatically cherry-pick commit to branch-0.6 label Sep 5, 2024
@yuqi1129 yuqi1129 merged commit e1df693 into apache:main Sep 5, 2024
28 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 5, 2024
<!--
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-0.6 Automatically cherry-pick commit to branch-0.6
4 participants