-
Notifications
You must be signed in to change notification settings - Fork 494
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
add wait to async export call #11033
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine except it only needs one call to get the export.
// http://localhost:8080/api/datasets/export?exporter=dataverse_json&persistentId=doi%3A10.5072/FK2/W6WIMQ | ||
RequestSpecification requestSpecification = given(); | ||
if (apiToken != null) { | ||
requestSpecification = given() | ||
.header(UtilIT.API_TOKEN_HTTP_HEADER, apiToken); | ||
} | ||
return requestSpecification | ||
Response resp = requestSpecification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only needs to be called once, after waiting if wait=true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
// http://localhost:8080/api/datasets/export?exporter=dataverse_json&persistentId=doi%3A10.5072/FK2/W6WIMQ | ||
RequestSpecification requestSpecification = given(); | ||
if (apiToken != null) { | ||
requestSpecification = given() | ||
.header(UtilIT.API_TOKEN_HTTP_HEADER, apiToken); | ||
} | ||
return requestSpecification | ||
Response resp = requestSpecification | ||
// .header(API_TOKEN_HTTP_HEADER, apiToken) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to keep these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed commented out code
This comment has been minimized.
This comment has been minimized.
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merging PR monitoring Jenkins |
What this PR does / why we need it: Sporadic test failures in DatasetsIT due to not waiting for an asynchronous call to finish
Which issue(s) this PR closes:#11032
Special notes for your reviewer:
Suggestions on how to test this: See IT tests. Monitor Jenkins for failures after merging
Does this PR introduce a user interface change? If mockups are available, please link/include them here:No
Is there a release notes update needed for this change?:No
Additional documentation:No