-
Notifications
You must be signed in to change notification settings - Fork 386
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
[#216][#217] test: add e2e integration test framework & metalake integration test #235
Conversation
Code Coverage Report
Files
|
integration/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/util/AbstractIT.java
Outdated
Show resolved
Hide resolved
@jerryshao Please help me review this PR, thanks. |
integration/src/test/java/com/datastrato/graviton/integration/util/GravitonITUtils.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Outdated
Show resolved
Hide resolved
client-java/src/main/java/com/datastrato/graviton/client/DTOConverters.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/util/ProcessData.java
Outdated
Show resolved
Hide resolved
integration/src/test/java/com/datastrato/graviton/integration/util/GravitonITUtils.java
Outdated
Show resolved
Hide resolved
@jerryshao @yuqi1129 Please help me review this PR, thinks. |
integration-test/src/test/java/com/datastrato/graviton/integration/util/GravitonITUtils.java
Outdated
Show resolved
Hide resolved
client-java/src/main/java/com/datastrato/graviton/client/DTOConverters.java
Outdated
Show resolved
Hide resolved
public void testLoadMetalake() { | ||
GravitonMetaLake metaLake = client.loadMetalake(NameIdentifier.of(metalakeName)); | ||
Assertions.assertEquals(metaLake.name(), metalakeName); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need to add more failure situations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, We need to supplement more coverage test cases.
I created a new issue #299 track this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd better put createMetalake
and dropMetalake
as a test, not in static start
and stop
methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because testing the listMetalake()
or modifyMetalake()
methods first requires the creation of a Metalake.
Put createMetalake()
in the static start()
methods, It is easy to run each test case separately.
Put dropMetalake()
in the static stop()
methods, It can safely delete metalak to run each test case separately.
This way it can support running all tests or run a single test.
integration-test/src/test/java/com/datastrato/graviton/integration/util/GravitonITUtils.java
Show resolved
Hide resolved
integration-test/src/test/java/com/datastrato/graviton/integration/util/GravitonITUtils.java
Outdated
Show resolved
Hide resolved
integration-test/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Show resolved
Hide resolved
integration-test/src/test/java/com/datastrato/graviton/integration/e2e/MetalakeIT.java
Show resolved
Hide resolved
…gration test (#235) ### What changes were proposed in this pull request? e2e integration test framework implementation below function. + Create a new integration module, you can execute each integration test code in it. + Each test set can start/stop a Graviton Server instance in the local or Github action environment. + You can through Graviton Client or HttpClient to connect the Graviton Server instance to test. #### Test operation flow 1. Deploy integration test environment ``` ./gradlew clean build ./gradlew clean compileDistribution # The `compileDistribution` command will create `distribution/package/...` directory in the Graviton root directory. ``` 2. Execute test units in the `integration` module. + Auto start Graviton Server before the test. + Execute your test code at this time. + Auto stop Graviton Server after the test. 3. Manual execution of tests units in GravitonServer debug mode + Enable `GRAVITON_DEBUG_OPTS` envronirment in the graviton-env.conf file. + Manual execution `./distribution/package/bin/graviton.sh start` + Remote debug Graviton Server in the 8000 port (default). + Set breakpoint in the Graviton project. + Manual execution integration tests unit. ### Why are the changes needed? e2e test provides a real deployment environment to execute integration tests. + It can validity test Graviton startup scripts, graviton.conf, graviton-env.sh, and more properties files. + It can validity test Catalogs JAR isolated. Fix: #216, #217 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? Tested in the integration module
What changes were proposed in this pull request?
e2e integration test framework implementation below function.
Test operation flow
Deploy integration test environment
Execute test units in the
integration
module.Manual execution of tests units in GravitonServer debug mode
GRAVITON_DEBUG_OPTS
envronirment in the graviton-env.conf file../distribution/package/bin/graviton.sh start
Why are the changes needed?
e2e test provides a real deployment environment to execute integration tests.
Fix: #216, #217
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
Tested in the integration module