Skip to content

Commit

Permalink
more sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed May 17, 2024
1 parent c7a443f commit a6efd5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void testDeepLinks() {
.statusCode(OK.getStatusCode())
.body("data.message", equalTo("Dataverse " + level1a + " linked successfully to " + level1b));
try {
Thread.sleep(2000);
Thread.sleep(4000);
} catch (InterruptedException ex) {
/**
* With solrconfig autoSoftCommit set to 1000 (1sec), this sleep is needed.
Expand Down
9 changes: 9 additions & 0 deletions src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -914,12 +914,21 @@ public void testCuratorCardDataversePopulation() throws InterruptedException {
createSubDataverseResponse.prettyPrint();
//UtilIT.getAliasFromResponse(createSubDataverseResponse);


Response grantRoleOnDataverseResponse = UtilIT.grantRoleOnDataverse(subDataverseAlias, "curator", "@" + username, apiTokenSuper);
grantRoleOnDataverseResponse.then().assertThat()
.statusCode(OK.getStatusCode());

String searchPart = "*";

try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
/**
* With solrconfig autoSoftCommit set to 1000 (1sec), this sleep is needed.
*/
}

Response searchPublishedSubtreeSuper = UtilIT.search(searchPart, apiTokenSuper, "&subtree="+parentDataverseAlias);
assertTrue(UtilIT.sleepForSearch(searchPart, apiToken, "&subtree="+parentDataverseAlias, UtilIT.MAXIMUM_INGEST_LOCK_DURATION), "Failed test if search exceeds max duration " + searchPart);
searchPublishedSubtreeSuper.prettyPrint();
Expand Down

0 comments on commit a6efd5f

Please sign in to comment.