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

[#4890] improvement(IT): Add the Integration Tests for getFileLocation interface #4920

Merged
merged 6 commits into from
Sep 13, 2024

Conversation

xloya
Copy link
Collaborator

@xloya xloya commented Sep 12, 2024

What changes were proposed in this pull request?

Add the integration Tests for getFileLocation interface and fix some issues.

Why are the changes needed?

Fix: #4890

How was this patch tested?

Add some ITs.

@xloya
Copy link
Collaborator Author

xloya commented Sep 12, 2024

@jerryshao Please take a look of this PR when you have time, thanks.

@xloya xloya closed this Sep 12, 2024
@xloya xloya reopened this Sep 12, 2024
@xloya xloya closed this Sep 12, 2024
@xloya xloya reopened this Sep 12, 2024
@xloya xloya self-assigned this Sep 12, 2024
String actualFileLocation =
catalog.asFilesetCatalog().getFileLocation(filesetIdent, "/test2.par");

Assertions.assertEquals(expectedFileset.storageLocation() + "/test2.par", actualFileLocation);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see you verify the CallerContext in the server side, can you please add some tests about this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add a test case in the server-side unit test.

@@ -268,7 +269,7 @@ public Response getFileLocation(
catalog,
schema,
fileset,
subPath);
RESTUtils.decodeString(subPath));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add the test to cover the scenario that path should be encoded and decoded?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Make the server-side encode/decode unit test more complete. In addition, the current integration test also covers the normal situation of encode/decode, otherwise the actualFileLocation returned by the server cannot match the Location expected by the client.

@jerryshao jerryshao merged commit 9f416c7 into apache:main Sep 13, 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] Add the Integration Tests for getFileLocation interface
2 participants