[SPARK-49121][PROTOBUF][TESTS][FOLLOWUP] Change to dynamically calculate ExpectedContext#stop in test case "SPARK-49121: from_protobuf and to_protobuf SQL functions"#47855
Closed
LuciferYang wants to merge 5 commits into
Conversation
LuciferYang
commented
Aug 23, 2024
| stop = 153)) | ||
| // The subsequent test scenarios also follow the following rules to define `stop`: | ||
| // stop = (start - 1) + prefixLength + fileNameLength + suffixLength | ||
| stop = 9 + 33 + fileNameLength + 9)) |
Contributor
Author
There was a problem hiding this comment.
@itholic If you haven't started investigating yet, could you please help check if this fix is feasible? Thanks
also cc @HyukjinKwon
ExpectedContext#stop in test case "SPARK-49121: from_protobuf and to_protobuf SQL functions"ExpectedContext#stop in test case "SPARK-49121: from_protobuf and to_protobuf SQL functions"
LuciferYang
commented
Aug 23, 2024
HyukjinKwon
approved these changes
Aug 24, 2024
Contributor
Author
|
Will close this one due to #47859 seems already fix this issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Currently, in the test case "SPARK-49121: from_protobuf and to_protobuf SQL functions", for the test case where the
fragmentcontains thetestFileDescFilevariable, we also use an absolute position to defineExpectedContext#stop.However, since the content of
testFileDescFileis related to both the build tool and the execution directory of the test case, its length is not fixed.For example, the maven daily test failed
and when I run the test locally using
sbt, it also failed:So this PR changes ExpectedContext#stop to a relative definition: stop = (start - 1) + prefixLength + fileNameLength + suffixLength
For example:
So the
stopdefinition will change fromstop = 153tostop = 9 + 33 + fileNameLength + 9, similar change have been made to other cases as well.Why are the changes needed?
Make the test more robust and fix the maven daily test.
Does this PR introduce any user-facing change?
No
How was this patch tested?
maven:
sbt:
maven tests passed
Was this patch authored or co-authored using generative AI tooling?
No