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 error response/AdminITlicense tests #137

Conversation

qqmyers
Copy link

@qqmyers qqmyers commented Jan 3, 2022

What this PR does / why we need it:

The build for the PR to IQSS shows a test failing. This commit should fix it. See the commit comment for details.

Runtime errors returned from a bean trigger a transaction rollback
exception and either those exceptions have to be caught (i.e. as in
https://github.com/IQSS/dataverse/blob/e7be5947abf2fbaa9ceaac09b27a60d439647f24/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java#L354-L357)
or some non-runtime exception has to be returned. I used the
WrappedResponse class as a way to simplify but reviewers may have some
other preference (e.g. just catch the transaction exceptions as in the
SearchServiceBean or use non-runtime exceptions directly in the
LicenseServiceBean class). Any of these should assure a non-null
response is returned which in turn should allow the AdminIt tests to
pass.
@janvanmansum janvanmansum merged commit 5a582f3 into DANS-KNAW:multi-license Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants