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

MINOR: Improve assertion error in assert_py4j_exception #8051

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

andygrove
Copy link
Contributor

@andygrove andygrove commented Apr 6, 2023

This is a small improvement to show a detailed error message if an integration test fails due to an exception not matching the expected exception, making it easier to debug a failure by looking at existing logs rather than adding debug print statements and running again.

Before

E       AssertionError

After

E       AssertionError: Expected error 'Found duplicante field(s)' did not appear in 'org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 5.0 failed 1 times, most recent failure: Lost task 0.0 in stage 5.0 (TID 11) (192.168.0.80 executor driver): java.lang.RuntimeException:  Found duplicate field(s) "1": [a, rand2] in id mapping mode 

@andygrove
Copy link
Contributor Author

build

@sameerz sameerz added the test Only impacts tests label Apr 6, 2023
Copy link
Collaborator

@gerashegalov gerashegalov left a comment

Choose a reason for hiding this comment

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

LGTM

@andygrove andygrove merged commit 0df49e7 into NVIDIA:branch-23.06 Apr 7, 2023
@andygrove andygrove deleted the it-improve-assert branch April 7, 2023 14:49
abellina pushed a commit to abellina/spark-rapids that referenced this pull request Apr 14, 2023
* Improve assertion error in assert_py4j_exception

Signed-off-by: Andy Grove <[email protected]>

* remove extra quote

---------

Signed-off-by: Andy Grove <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Only impacts tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants