Skip to content

Commit

Permalink
Merge pull request #6171 from IQSS/6150-integration-test-failures
Browse files Browse the repository at this point in the history
6150 integration test failures
  • Loading branch information
kcondon authored Sep 16, 2019
2 parents 8cec3bb + 62a7103 commit 860d53e
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,14 @@ public void testCreateDataset() {

Response publishDataverse = UtilIT.publishDataverseViaSword(dataverseAlias, apiToken);
assertEquals(OK.getStatusCode(), publishDataverse.getStatusCode());
//Remove random sleep #6128 9/3/2019
// throw in a short sleep, just in case:
/*

// Return a short sleep here
//without it we have seen some database deadlocks SEK 09/13/2019

try {
Thread.sleep(1000l);
} catch (InterruptedException iex) {}
*/

// ... And now that it's published, try to create a dataset again,
// as the "random", not specifically authorized user:
// (this time around, it should work!)
Expand Down Expand Up @@ -342,13 +343,14 @@ public void testCreatePublishDestroyDataset() {
.statusCode(403);

logger.info("Attempting to publish a major version");
//Remove random sleep #6128 9/3/2019
// Return random sleep 9/13/2019
// Without it we've seen some DB deadlocks
// 3 second sleep, to allow the indexing to finish:
/*

try {
Thread.sleep(3000l);
} catch (InterruptedException iex) {}
*/

Response publishDataset = UtilIT.publishDatasetViaNativeApi(datasetPersistentId, "major", apiToken);
assertEquals(200, publishDataset.getStatusCode());

Expand Down Expand Up @@ -486,13 +488,14 @@ public void testExport() {
.statusCode(403);

logger.info("In testExport; attempting to publish, as major version");
//Remove random sleep #6128 9/3/2019
//Return random sleep 9/13/2019
// 3 second sleep, to allow the indexing to finish:
/*
// Without it we've seen som DB dealocks

try {
Thread.sleep(3000l);
} catch (InterruptedException iex) {}
*/

Response publishDataset = UtilIT.publishDatasetViaNativeApi(datasetPersistentId, "major", apiToken);
assertEquals(200, publishDataset.getStatusCode());

Expand Down Expand Up @@ -616,13 +619,13 @@ public void testExcludeEmail() {
Response setToExcludeEmailFromExport = UtilIT.setSetting(SettingsServiceBean.Key.ExcludeEmailFromExport, "true");
setToExcludeEmailFromExport.then().assertThat()
.statusCode(OK.getStatusCode());
//Remove random sleep #6128 9/3/2019
// return random sleep 9/13/2019
// 3 second sleep, to allow the indexing to finish:
/*

try {
Thread.sleep(3000l);
} catch (InterruptedException iex) {}
*/

Response publishDataset = UtilIT.publishDatasetViaNativeApi(datasetPersistentId, "major", apiToken);
assertEquals(200, publishDataset.getStatusCode());

Expand Down Expand Up @@ -717,12 +720,12 @@ public void testSequentialNumberAsIdentifierGenerationStyle() {
logger.info("identifier: " + identifier);
String numericPart = identifier.replace("FK2/", ""); //remove shoulder from identifier
assertTrue(StringUtils.isNumeric(numericPart));
//Remove random sleep #6128 9/3/2019
/*
//Return random sleep 9/13/2019

try {
Thread.sleep(3000l);
} catch (Exception ex) {logger.warning("failed to execute sleep 3 sec.");}
*/


Response deleteDatasetResponse = UtilIT.deleteDatasetViaNativeApi(datasetId, apiToken);
deleteDatasetResponse.prettyPrint();
Expand Down Expand Up @@ -1734,12 +1737,12 @@ public void testUpdatePIDMetadataAPI() {

Response publishDataverse = UtilIT.publishDataverseViaSword(dataverseAlias, apiToken);
assertEquals(200, publishDataverse.getStatusCode());
//Remove random sleep #6128 9/3/2019
/*
//Return random sleep 9/13/2019
//without it we've seen DB deadlocks
try {
Thread.sleep(3000l);
} catch (InterruptedException iex){}
*/

Response publishDataset = UtilIT.publishDatasetViaNativeApi(datasetPersistentId, "major", apiToken);
assertEquals(200, publishDataset.getStatusCode());

Expand Down

0 comments on commit 860d53e

Please sign in to comment.