diff --git a/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java b/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java index 6791cf331b2..47d254300be 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java @@ -163,7 +163,7 @@ public void testDeepLinks() { .statusCode(OK.getStatusCode()) .body("data.message", equalTo("Dataverse " + level1a + " linked successfully to " + level1b)); try { - Thread.sleep(4000); + Thread.sleep(3000); } catch (InterruptedException ex) { /** * With solrconfig autoSoftCommit set to 1000 (1sec), this sleep is needed. @@ -190,6 +190,13 @@ public void testDeepLinks() { .statusCode(OK.getStatusCode()) .body("data.message", equalTo("Dataverse " + level2a + " linked successfully to " + level2b)); + try { + Thread.sleep(3000); + } catch (InterruptedException ex) { + /** + * With solrconfig autoSoftCommit set to 1000 (1sec), this sleep is needed. + */ + } Response searchLevel2toLevel2 = UtilIT.search("*", apiToken, "&subtree=" + level2b); searchLevel2toLevel2.prettyPrint(); searchLevel2toLevel2.then().assertThat() diff --git a/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java b/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java index d60821af312..3bd233f978c 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java @@ -61,7 +61,7 @@ public class UtilIT { private static final String API_TOKEN_KEY = "apiToken"; private static final String BUILTIN_USER_KEY = "burrito"; private static final String EMPTY_STRING = ""; - public static final int MAXIMUM_INGEST_LOCK_DURATION = 16; // 15 + 1 sec for current autoSoftCommit duration + public static final int MAXIMUM_INGEST_LOCK_DURATION = 17; // 15 + 2 sec for current autoSoftCommit duration of 1sec public static final int MAXIMUM_PUBLISH_LOCK_DURATION = 20; public static final int MAXIMUM_IMPORT_DURATION = 1;