Skip to content

Commit df068fa

Browse files
committed
add sleep for ingest
1 parent e0414a0 commit df068fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
import org.junit.jupiter.api.Assertions;
3434
import static org.junit.jupiter.api.Assertions.assertEquals;
3535
import static org.junit.jupiter.api.Assertions.assertNotNull;
36+
import static org.junit.jupiter.api.Assertions.assertTrue;
37+
3638
import org.junit.jupiter.api.BeforeAll;
3739
import org.junit.jupiter.api.Test;
3840

@@ -552,6 +554,8 @@ public void testDirectUploadDetectStataFile() {
552554
Assertions.assertEquals(driverId + "://" + BUCKET_NAME + ":" + keyInDataverse, storageIdentifier);
553555

554556
String keyInS3 = datasetStorageIdentifier + "/" + keyInDataverse;
557+
// UtilIT.MAXIMUM_INGEST_LOCK_DURATION is 3 but not long enough.
558+
assertTrue(UtilIT.sleepForLock(datasetId.longValue(), "Ingest", apiToken, UtilIT.MAXIMUM_INGEST_LOCK_DURATION + 3), "Failed test if Ingest Lock exceeds max duration " + keyInS3);
555559

556560
Response getFileData1 = UtilIT.getFileData(fileId, apiToken);
557561
getFileData1.prettyPrint();

0 commit comments

Comments
 (0)