From cd907fd6810c85ae073df77e645e99fd80d41ad6 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:22:34 -0400 Subject: [PATCH 1/3] Fix DataRetrieverApiIT.testRetrieveMyDataCollections() for github migration --- .../edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java index 0efe2747c73..58fd91ccbf1 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java @@ -139,6 +139,11 @@ public void testRetrieveMyDataCollections() throws InterruptedException { String User3Username = UtilIT.getUsernameFromResponse(createUserResponse); String User3ApiToken = UtilIT.getApiTokenFromResponse(createUserResponse); + // Get the base number of collections since it's not always 1 for root. + // There may be others left from another test that everyone can access + retrieveMyCollectionListResponse = UtilIT.retrieveMyCollectionList(User1ApiToken, null); + rootCount = retrieveMyCollectionListResponse.getBody().jsonPath().getList("data.items").size(); + // User1 creates 15 Dataverses and adds a role to each allowing User2 access List dataverses = new ArrayList<>(); int user1DataverseCount = 15; From 352e361a8eb29b1bf2c83e2833ded8effca87a27 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:36:05 -0400 Subject: [PATCH 2/3] address review comments --- .../java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java index 58fd91ccbf1..da7f4e04f6e 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java @@ -115,7 +115,6 @@ public void testRetrieveMyDataAsJsonString() throws InterruptedException { @Disabled("Temporarily disabled because this integration test is not reliable in CI; re-enable once stabilized. All assertions return one extra dataset than expected.") @Test public void testRetrieveMyDataCollections() throws InterruptedException { - int rootCount = 1; // everyone has access to this dataverse List> items; Response createDataverseResponse; Response retrieveMyCollectionListResponse; @@ -142,7 +141,7 @@ public void testRetrieveMyDataCollections() throws InterruptedException { // Get the base number of collections since it's not always 1 for root. // There may be others left from another test that everyone can access retrieveMyCollectionListResponse = UtilIT.retrieveMyCollectionList(User1ApiToken, null); - rootCount = retrieveMyCollectionListResponse.getBody().jsonPath().getList("data.items").size(); + int rootCount = retrieveMyCollectionListResponse.getBody().jsonPath().getList("data.items").size(); // User1 creates 15 Dataverses and adds a role to each allowing User2 access List dataverses = new ArrayList<>(); From a5a5410bf5d4fe3f237ddc3a831ba3710bf59861 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Tue, 26 May 2026 14:12:46 -0400 Subject: [PATCH 3/3] un-disable testRetrieveMyDataCollections() test --- .../java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java index da7f4e04f6e..4e5a8cfada4 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java @@ -112,7 +112,6 @@ public void testRetrieveMyDataAsJsonString() throws InterruptedException { } // Test getting a list of collections that the user can add datasets to - @Disabled("Temporarily disabled because this integration test is not reliable in CI; re-enable once stabilized. All assertions return one extra dataset than expected.") @Test public void testRetrieveMyDataCollections() throws InterruptedException { List> items;