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

[#4633] refactor(integration-test): move the tests in integration-test module into their corresponding modules #4628

Merged
merged 8 commits into from
Sep 9, 2024

Conversation

mchades
Copy link
Contributor

@mchades mchades commented Aug 22, 2024

What changes were proposed in this pull request?

  • move tests from module integration-test to other corresponding module
  • add CI for TrinoIT

Why are the changes needed?

Fix: #4633

Does this PR introduce any user-facing change?

no

How was this patch tested?

CI passed

@mchades mchades force-pushed the seperate-trino-ci branch from fe1ac6d to 5635159 Compare August 22, 2024 11:31
@mchades mchades changed the title [test] refactor integration-test module [#4633] refactor(integration-test): remove integration-test module Aug 22, 2024
@mchades mchades self-assigned this Aug 22, 2024
@mchades
Copy link
Contributor Author

mchades commented Aug 22, 2024

@diqiu50 could you plz help to review the Trino part?

@mchades mchades marked this pull request as ready for review August 22, 2024 11:53
@mchades mchades force-pushed the seperate-trino-ci branch from 5635159 to 6a96485 Compare August 23, 2024 03:28
trino-connector/integrate-test/build/*.log
trino-connector/integrate-test/build/*.tar
distribution/package/logs/gravitino-server.out
distribution/package/logs/gravitino-server.log
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Missing the docker container's logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@mchades mchades force-pushed the seperate-trino-ci branch from 6a96485 to 019dc8f Compare August 26, 2024 02:50
@jerqi
Copy link
Contributor

jerqi commented Aug 26, 2024

The test of the client will depend on server. I don't think it's correct behaviour. An integration test depends on multiple catalogs. We shouldn't remove integration-test module.

@mchades
Copy link
Contributor Author

mchades commented Aug 26, 2024

The test of the client will depend on server. I don't think it's correct behaviour. An integration test depends on multiple catalogs. We shouldn't remove integration-test module.

Each catalog has its own integration test. If the server changes, we can use client integration tests to verify it. Therefore, I removed the integration-test module.

@jerqi
Copy link
Contributor

jerqi commented Aug 26, 2024

The test of the client will depend on server. I don't think it's correct behaviour. An integration test depends on multiple catalogs. We shouldn't remove integration-test module.

Each catalog has its own integration test. If the server changes, we can use client integration tests to verify it. Therefore, I removed the integration-test module.

If we need a federated catalog test, we should put it into which catalog?

@mchades
Copy link
Contributor Author

mchades commented Aug 26, 2024

The test of the client will depend on server. I don't think it's correct behaviour. An integration test depends on multiple catalogs. We shouldn't remove integration-test module.

Each catalog has its own integration test. If the server changes, we can use client integration tests to verify it. Therefore, I removed the integration-test module.

If we need a federated catalog test, we should put it into which catalog?

It depends on your test purpose, the test can be added to the integration-test of clients/client-java or trino-connector/integration-test or web/integration-test.
For example, the current TagIT, AuditIT, and CatalogIT are in integration test of clients/client-java

@mchades mchades force-pushed the seperate-trino-ci branch 6 times, most recently from c5eeb9d to 6b17a13 Compare August 26, 2024 13:03
@jerryshao
Copy link
Contributor

I was thinking that there may be some APIs that only exist on the server side, and don't have client APIs, where do we put that tests?

@mchades
Copy link
Contributor Author

mchades commented Aug 27, 2024

I was thinking that there may be some APIs that only exist on the server side, and don't have client APIs, where do we put that tests?

I think the situation you mentioned can be covered by server's UT, and if necessary, integration/test directory can also be added to the server's test package

@mchades
Copy link
Contributor Author

mchades commented Aug 27, 2024

close and reopen for rerun CI

@mchades mchades closed this Aug 27, 2024
@mchades mchades reopened this Aug 27, 2024
@mchades mchades changed the title [#4633] refactor(integration-test): remove integration-test module [#4633] refactor(integration-test): move the tests in integration-test module into their corresponding modules Aug 30, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we put these under resource folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just kept it in its original position. Let me give it a try.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After trying this, I would suggest to leave it as it currently is, so that other modules can access it via a fixed path. If it is placed in a resource file, it needs to be accessed via the class path, which adds complexity when calling across modules.

settings.gradle.kts Outdated Show resolved Hide resolved
@mchades mchades force-pushed the seperate-trino-ci branch 4 times, most recently from a96fe1c to dbf4bf3 Compare September 5, 2024 07:24
Comment on lines 31 to 32
- clients/filesystem-hadoop3/**
- clients/filesystem-hadoop3-runtime/**
Copy link
Contributor

Choose a reason for hiding this comment

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

The change of gvfs should not trigger the Trino tests.

- server/**
- server-common/**
- trino-connector/**
- docs/open-api/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here. Can you please carefully check this to make sure only the related changes will trigger the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I plan to fix them all in #4827, do you suggest doing it in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine doing it in #4827 .

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.store.relational.service;
package org.apache.gravitino.storage.relational.service;
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of changing this package name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this class is actually a UT, not IT, it tests the interface of FilesetMetaService. So I changed the package name

@@ -0,0 +1,73 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

For the web module, should you also do like trino module, to have two submodules under the web module?

Copy link
Contributor

Choose a reason for hiding this comment

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

What's your opinion on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's better to follow the same specifications. I refactored the web module to the same

@@ -627,7 +625,7 @@ tasks {
}

val compileTrinoConnector by registering {
dependsOn("trino-connector:copyLibs")
dependsOn("trino-connector:trino-connector:copyLibs")
Copy link
Contributor

@jerryshao jerryshao Sep 6, 2024

Choose a reason for hiding this comment

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

Can you please check if the LICENSE, NOTICE, and DISCLAIMER are correctly copied to the release package for trino-connector, web, and gravitino packages? Since the trino and web package location has been changed, I guess it will be failed to locate the file, can you please check and fix?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also check the compileDistribution and assembleDistribution, to see if they still work or not?

Copy link
Contributor Author

@mchades mchades Sep 8, 2024

Choose a reason for hiding this comment

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

I have checked them all, they work well

@jerryshao
Copy link
Contributor

There're some test errors, can you please fix them?

@jerryshao jerryshao closed this Sep 8, 2024
@jerryshao jerryshao reopened this Sep 8, 2024
@jerryshao jerryshao merged commit 6c0ecf5 into apache:main Sep 9, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] move tests from module integration-test to other corresponding module
4 participants