Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable loading of metadata blocks in API tests, more sleep #9873

Merged
merged 2 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,13 @@ public void testMigrateHDLToDOI() {
.statusCode(OK.getStatusCode());
}

/**
* Disabled because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Disabled
@Test
public void testLoadMetadataBlock_NoErrorPath() {
Response createUser = UtilIT.createRandomUser();
Expand Down Expand Up @@ -778,6 +785,13 @@ public void testLoadMetadataBlock_NoErrorPath() {
assertEquals(244, (int) statistics.get("Controlled Vocabulary"));
}

/**
* Disabled because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Disabled
@Test
public void testLoadMetadataBlock_ErrorHandling() {
Response createUser = UtilIT.createRandomUser();
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void testMoveLinkedDataset() {
.statusCode(OK.getStatusCode())
.body("feed.entry[0].id", CoreMatchers.endsWith(datasetPid));

UtilIT.sleepForReindex(datasetPid, superuserApiToken, 10);
UtilIT.sleepForReindex(datasetPid, superuserApiToken, 20);
Response getLinksAfter = UtilIT.getDatasetLinks(datasetPid, superuserApiToken);
getLinksAfter.prettyPrint();
getLinksAfter.then().assertThat()
Expand Down
9 changes: 8 additions & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,14 @@ static Response updateDatasetPIDMetadata(String persistentId, String apiToken)
.post("/api/datasets/:persistentId/modifyRegistrationMetadata/?persistentId=" + persistentId);
return response;
}


/**
* Deprecated because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Deprecated
static Response loadMetadataBlock(String apiToken, byte[] body) {
return given()
.header(API_TOKEN_HTTP_HEADER, apiToken)
Expand Down
Loading