From 2ad7e2f05462d864b54678fbe386c28421c86f27 Mon Sep 17 00:00:00 2001 From: Shelby Holden Date: Mon, 4 Mar 2024 13:38:02 -0500 Subject: [PATCH 1/2] move back to datarepo-client --- .../groovy/bio.terra.catalog.java-common-conventions.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/bio.terra.catalog.java-common-conventions.gradle b/buildSrc/src/main/groovy/bio.terra.catalog.java-common-conventions.gradle index 9669a028..e18ec6bc 100644 --- a/buildSrc/src/main/groovy/bio.terra.catalog.java-common-conventions.gradle +++ b/buildSrc/src/main/groovy/bio.terra.catalog.java-common-conventions.gradle @@ -50,7 +50,7 @@ dependencies { implementation 'bio.terra:terra-common-lib:0.1.9-SNAPSHOT' // guava is depended on by terra-common-lib, https://broadworkbench.atlassian.net/browse/DC-798 implementation 'com.google.guava:guava:31.1-jre' - implementation 'bio.terra:datarepo-jakarta-client:1.563.0-SNAPSHOT' + implementation 'bio.terra:datarepo-client:2.13.0-SNAPSHOT' } tasks.named('test') { From 440ac0c6ac83a6e7cb6fe7ad0974f9acc122d1e4 Mon Sep 17 00:00:00 2001 From: Shelby Holden Date: Mon, 4 Mar 2024 13:47:16 -0500 Subject: [PATCH 2/2] one more argument for enumerate snapshots fix tests --- .../java/bio/terra/catalog/datarepo/DatarepoService.java | 2 +- .../bio/terra/catalog/datarepo/DatarepoServiceTest.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/bio/terra/catalog/datarepo/DatarepoService.java b/common/src/main/java/bio/terra/catalog/datarepo/DatarepoService.java index 9904ebf9..17a0786c 100644 --- a/common/src/main/java/bio/terra/catalog/datarepo/DatarepoService.java +++ b/common/src/main/java/bio/terra/catalog/datarepo/DatarepoService.java @@ -72,7 +72,7 @@ public Map getDatasets() { EnumerateSnapshotModel response = datarepoClient .snapshotsApi() - .enumerateSnapshots(null, MAX_DATASETS, null, null, null, null, null, null); + .enumerateSnapshots(null, MAX_DATASETS, null, null, null, null, null, null, null); Map> roleMap = response.getRoleMap(); return response.getItems().stream() diff --git a/common/src/test/java/bio/terra/catalog/datarepo/DatarepoServiceTest.java b/common/src/test/java/bio/terra/catalog/datarepo/DatarepoServiceTest.java index a6b59342..9e67e2df 100644 --- a/common/src/test/java/bio/terra/catalog/datarepo/DatarepoServiceTest.java +++ b/common/src/test/java/bio/terra/catalog/datarepo/DatarepoServiceTest.java @@ -73,7 +73,8 @@ void getSnapshots() throws Exception { new EnumerateSnapshotModel() .items(List.of(new SnapshotSummaryModel().id(snapshotId).phsId("1234"))) .roleMap(items); - when(snapshotsApi.enumerateSnapshots(any(), any(), any(), any(), any(), any(), any(), any())) + when(snapshotsApi.enumerateSnapshots( + any(), any(), any(), any(), any(), any(), any(), any(), any())) .thenReturn(esm); var returnedItems = datarepoService.getDatasets(); assertThat(returnedItems, is(expectedItems)); @@ -99,7 +100,8 @@ void getSnapshot() throws Exception { @Test void getSnapshotsException() throws Exception { mockSnapshots(); - when(snapshotsApi.enumerateSnapshots(any(), any(), any(), any(), any(), any(), any(), any())) + when(snapshotsApi.enumerateSnapshots( + any(), any(), any(), any(), any(), any(), any(), any(), any())) .thenThrow(new ApiException()); assertThrows(DatarepoException.class, () -> datarepoService.getDatasets()); }