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

fix tests on 1.8 #13

Merged
merged 3 commits into from
Aug 23, 2022
Merged

Conversation

ericphanson
Copy link
Contributor

In 1.8, asyncmap throws CapturedExceptions so the stacktrace doesn't get dropped (JuliaLang/julia#42105). This doesn't break pmap retries (because they get unwrapped) but it does change the exception getting thrown, so it breaks the tests here.

This PR uses the feature from JuliaLang/julia#41888 to test against the error text on 1.8 (since the exception type is just CapturedException).

@ericphanson
Copy link
Contributor Author

Seems like the CI workflow got disabled

Comment on lines 20 to 24
if VERSION < v"1.8-"
@test_throws ErrorException robust_pmap(throw_isodd, input)
else
@test_throws "Error" robust_pmap(throw_isodd, input)
end
Copy link
Member

Choose a reason for hiding this comment

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

if we are testing for presents of the word Error then we might as well just

Suggested change
if VERSION < v"1.8-"
@test_throws ErrorException robust_pmap(throw_isodd, input)
else
@test_throws "Error" robust_pmap(throw_isodd, input)
end
@test_throws Exception robust_pmap(throw_isodd, input)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, just since the string message is Error here... could change it to ErrorException("Error123") and test for "Error123"

Copy link
Member

Choose a reason for hiding this comment

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

sounds good

@oxinabox
Copy link
Member

Thanks

@oxinabox oxinabox merged commit e7db60d into invenia:master Aug 23, 2022
@ericphanson ericphanson deleted the eph/fix-tests-on-1.8 branch August 23, 2022 11:59
@ericphanson
Copy link
Contributor Author

Thanks for maintaining parallelism! I use a modified version of robust_pmap (I changed up the logging) & copied the tests, which is why I learned they were failing on 1.8 (since my version's tests started failing). (And in a fun coincidence the change upstream is due to my PR).

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.

2 participants