-
Notifications
You must be signed in to change notification settings - Fork 337
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
[Bug report] TestHiveTableOperations
can't be test alone
#4851
Comments
Hi Team, Please correct me if I misunderstand the problem or my way of usage is incorrect. I will try to fix it first and then continue to check the coverage of Best Regards, |
github-actions bot
pushed a commit
that referenced
this issue
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.
jerryshao
added
0.6.1
Release v0.6.1
0.7.0
Release v0.7.0
and removed
0.6.0
Release v0.6.0
labels
Sep 5, 2024
jerryshao
pushed a commit
that referenced
this issue
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. Co-authored-by: Edward Xu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
main branch
Describe what's wrong
When using this command line
gradle :catalogs:catalog-hive:test --tests 'org.apache.gravitino.catalog.hive.TestHiveTableOperations'
, unit test will fail.Error message and/or stacktrace
Here are logs of testing.
How to reproduce
Gravitino version: main branch commit 03e2110.
Run this command:
gradle :catalogs:catalog-hive:test --tests 'org.apache.gravitino.catalog.hive.TestHiveTableOperations'
Additional context
This issue only happens when
TestHiveTable
is not initialized.It imports static variables
TestHiveTable.hiveCatalogOperations
.So, when
TestHiveTable
class is not initialized withsetup()
, the imported variable isnull
.I find this problem during check the coverage of
TestHiveTableOperations
on issue #2183.The text was updated successfully, but these errors were encountered: