diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DatasetTypesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DatasetTypesIT.java index e8426b638d7..a0b9f5325d0 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DatasetTypesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DatasetTypesIT.java @@ -94,7 +94,8 @@ public void testCreateSoftwareDatasetNative() { String dataset2Pid = JsonPath.from(createDataset.getBody().asString()).getString("data.persistentId"); UtilIT.publishDatasetViaNativeApi(dataset2Pid, "major", apiToken).then().assertThat().statusCode(OK.getStatusCode()); - + //An explicit sleep is needed here because the searchAndShowFacets won't sleep for the query used here + UtilIT.sleepForReindex(dataset2Pid, apiToken, 5); Response searchCollection = UtilIT.searchAndShowFacets("parentName:" + dataverseAlias, null); searchCollection.prettyPrint(); searchCollection.then().assertThat()