From 9270ecac032d7982a119343f9b24855e8982319e Mon Sep 17 00:00:00 2001 From: Meet Mehta Date: Wed, 31 Jul 2024 21:54:21 -0400 Subject: [PATCH 1/5] Migrate FhirStoreUtilTest to Junit5 --- pipelines/common/pom.xml | 13 ++++++++++ .../fhir/analytics/FhirStoreUtilTest.java | 25 +++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/pipelines/common/pom.xml b/pipelines/common/pom.xml index 77ee3b6d5..538e57ce8 100644 --- a/pipelines/common/pom.xml +++ b/pipelines/common/pom.xml @@ -251,6 +251,19 @@ beam-sdks-java-io-google-cloud-platform ${beam.version} + + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + + + org.mockito + mockito-junit-jupiter + 5.7.0 + test + + diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java index e095c4ab0..70a09a2cc 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java @@ -17,7 +17,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.lenient; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; @@ -32,15 +32,15 @@ import org.hamcrest.Matchers; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Patient; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Answers; import org.mockito.ArgumentMatchers; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class FhirStoreUtilTest { @Mock(answer = Answers.RETURNS_DEEP_STUBS) @@ -61,7 +61,7 @@ public class FhirStoreUtilTest { private Bundle patientResponseBundle; - @Before + @BeforeEach public void setup() throws IOException { IParser jsonParser = FhirContext.forR4().newJsonParser(); @@ -81,11 +81,14 @@ public void setup() throws IOException { patient = (Patient) patientBundle.getEntryFirstRep().getResource(); - when(clientFactory.newGenericClient(sinkUrl)).thenReturn(client); - when(client.update().resource(patient).withId(patient.getId()).encodedJson()).thenReturn(iexec); - when(client.transaction().withBundle(ArgumentMatchers.any(Bundle.class)).execute()) + lenient().when(clientFactory.newGenericClient(sinkUrl)).thenReturn(client); + lenient() + .when(client.update().resource(patient).withId(patient.getId()).encodedJson()) + .thenReturn(iexec); + lenient() + .when(client.transaction().withBundle(ArgumentMatchers.any(Bundle.class)).execute()) .thenReturn(patientResponseBundle); - doReturn(outcome).when(iexec).execute(); + lenient().doReturn(outcome).when(iexec).execute(); fhirStoreUtil = FhirStoreUtil.createFhirStoreUtil(sinkUrl, clientFactory); } From 939dad7eab372b98c1ae89c4fcc36697c9e929a0 Mon Sep 17 00:00:00 2001 From: Meet Mehta Date: Fri, 30 Aug 2024 22:32:54 -0400 Subject: [PATCH 2/5] Migrate test cases of common module to Junit 5 --- .../analytics/AvroConversionUtilTest.java | 12 +++---- .../google/fhir/analytics/FetchUtilTest.java | 14 ++++---- .../fhir/analytics/FhirStoreUtilTest.java | 4 +-- .../google/fhir/analytics/GZipUtilTest.java | 8 ++--- .../fhir/analytics/GcsDwhFilesTest.java | 18 +++++------ .../fhir/analytics/LocalDwhFilesTest.java | 32 +++++++++---------- .../fhir/analytics/ParquetUtilTest.java | 24 ++++++-------- 7 files changed, 54 insertions(+), 58 deletions(-) diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/AvroConversionUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/AvroConversionUtilTest.java index 46702e78c..d7b5007fc 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/AvroConversionUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/AvroConversionUtilTest.java @@ -45,19 +45,19 @@ import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Resource; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class AvroConversionUtilTest { private String patientBundle; private String observationBundle; private String usCoreProfilesStructureDefinitionsPath; public static final String BASE_PATIENT = "http://hl7.org/fhir/StructureDefinition/Patient"; - @Before + @BeforeEach public void setup() throws IOException, ClassNotFoundException, URISyntaxException, ProfileException { AvroConversionUtil.initializeAvroConverters(); diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/FetchUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/FetchUtilTest.java index 56885f9ae..e04aa5c77 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/FetchUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/FetchUtilTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 Google LLC + * Copyright 2020-2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +26,14 @@ import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.impl.RestfulClientFactory; import org.hl7.fhir.r4.model.Patient; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Answers; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class FetchUtilTest { private static final String SOURCE_FHIR_URL = "someurl"; @@ -49,7 +49,7 @@ public class FetchUtilTest { FetchUtil fetchUtil; - @Before + @BeforeEach public void setUp() throws Exception { fetchUtil = new FetchUtil( diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java index 70a09a2cc..edada81bd 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/FhirStoreUtilTest.java @@ -17,7 +17,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; -import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.*; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; @@ -81,7 +81,7 @@ public void setup() throws IOException { patient = (Patient) patientBundle.getEntryFirstRep().getResource(); - lenient().when(clientFactory.newGenericClient(sinkUrl)).thenReturn(client); + when(clientFactory.newGenericClient(sinkUrl)).thenReturn(client); lenient() .when(client.update().resource(patient).withId(patient.getId()).encodedJson()) .thenReturn(iexec); diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java index ebb04f3a3..933d8c3fe 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java @@ -24,11 +24,11 @@ import java.nio.charset.StandardCharsets; import java.util.zip.GZIPOutputStream; import org.apache.commons.io.IOUtils; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class GZipUtilTest { @Test diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/GcsDwhFilesTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/GcsDwhFilesTest.java index 8e260197b..8fdb91601 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/GcsDwhFilesTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/GcsDwhFilesTest.java @@ -50,10 +50,10 @@ import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.apache.beam.sdk.util.MimeTypes; import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @@ -64,7 +64,7 @@ public class GcsDwhFilesTest { @Mock private GcsUtil mockGcsUtil; private AutoCloseable closeable; - @Before + @BeforeEach public void setUp() { closeable = MockitoAnnotations.openMocks(this); GcsOptions gcsOptions = PipelineOptionsFactory.as(GcsOptions.class); @@ -72,7 +72,7 @@ public void setUp() { FileSystems.setDefaultPipelineOptions(gcsOptions); } - @After + @AfterEach public void closeService() throws Exception { closeable.close(); } @@ -176,7 +176,7 @@ public void writeTimestampFile_FileAlreadyExists_ThrowsError() throws IOExceptio Mockito.when(mockGcsUtil.getObjects(List.of(GcsPath.fromUri(gcsFileName)))).thenReturn(items); DwhFiles dwhFiles = new DwhFiles("gs://testbucket/testdirectory", FhirContext.forR4Cached()); - Assert.assertThrows( + Assertions.assertThrows( FileAlreadyExistsException.class, () -> dwhFiles.writeTimestampFile(DwhFiles.TIMESTAMP_FILE_START)); } @@ -215,14 +215,14 @@ public void readTimestampFile() throws IOException { DwhFiles dwhFiles = new DwhFiles("gs://testbucket/testdirectory", FhirContext.forR4Cached()); Instant actualInstant = dwhFiles.readTimestampFile(DwhFiles.TIMESTAMP_FILE_START); - Assert.assertEquals(currentInstant.getEpochSecond(), actualInstant.getEpochSecond()); + Assertions.assertEquals(currentInstant.getEpochSecond(), actualInstant.getEpochSecond()); Mockito.verify(mockGcsUtil, Mockito.times(1)).open(GcsPath.fromUri(gcsFileName)); } @Test public void dwhRootPrefixForGCSPath_returnsFileSeparator() { String fileSeparator = DwhFiles.getFileSeparatorForDwhFiles("gs://testbucket/testdirectory"); - Assert.assertEquals("/", fileSeparator); + Assertions.assertEquals("/", fileSeparator); } private void mockFileRead(String gcsFileName, Instant instant) throws IOException { diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/LocalDwhFilesTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/LocalDwhFilesTest.java index 5268d8d78..72bea7ece 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/LocalDwhFilesTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/LocalDwhFilesTest.java @@ -38,21 +38,21 @@ import org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions; import org.apache.beam.sdk.io.fs.ResourceId; import org.apache.commons.lang3.SystemUtils; -import org.junit.Assert; -import org.junit.Assume; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; public class LocalDwhFilesTest { @Test public void getResourcePathTestNonWindows() { - Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + Assumptions.assumeFalse(SystemUtils.IS_OS_WINDOWS); DwhFiles dwhFiles = new DwhFiles("/tmp", FhirContext.forR4Cached()); assertThat(dwhFiles.getResourcePath("Patient").toString(), equalTo("/tmp/Patient/")); } @Test public void getResourcePathTestWindows() { - Assume.assumeTrue(SystemUtils.IS_OS_WINDOWS); + Assumptions.assumeTrue(SystemUtils.IS_OS_WINDOWS); DwhFiles dwhFiles = new DwhFiles("C:\\tmp", FhirContext.forR4Cached()); assertThat(dwhFiles.getResourcePath("Patient").toString(), equalTo("C:\\tmp\\Patient\\")); } @@ -76,7 +76,7 @@ public void getIncrementalRunPathTest() throws IOException { @Test public void newIncrementalRunPathTestNonWindows() throws IOException { - Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + Assumptions.assumeFalse(SystemUtils.IS_OS_WINDOWS); DwhFiles instance = new DwhFiles("/tmp", FhirContext.forR4Cached()); ResourceId incrementalRunPath = instance.newIncrementalRunPath(); assertThat( @@ -86,7 +86,7 @@ public void newIncrementalRunPathTestNonWindows() throws IOException { @Test public void newIncrementalRunPathTesWindows() throws IOException { - Assume.assumeTrue(SystemUtils.IS_OS_WINDOWS); + Assumptions.assumeTrue(SystemUtils.IS_OS_WINDOWS); DwhFiles instance = new DwhFiles("C:\\tmp", FhirContext.forR4Cached()); ResourceId incrementalRunPath = instance.newIncrementalRunPath(); assertThat(incrementalRunPath.toString(), equalTo("C:\\tmp\\incremental_run\\")); @@ -197,7 +197,7 @@ public void writeTimestampFile_FileAlreadyExists_ThrowsError() throws IOExceptio createFile(timestampPath, Instant.now().toString().getBytes(StandardCharsets.UTF_8)); DwhFiles dwhFiles = new DwhFiles(root.toString(), FhirContext.forR4Cached()); - Assert.assertThrows( + Assertions.assertThrows( FileAlreadyExistsException.class, () -> dwhFiles.writeTimestampFile(DwhFiles.TIMESTAMP_FILE_START)); @@ -231,7 +231,7 @@ public void readTimestampFile() throws IOException { Instant actualInstant = dwhFiles.readTimestampFile(DwhFiles.TIMESTAMP_FILE_START); - Assert.assertEquals(currentInstant.getEpochSecond(), actualInstant.getEpochSecond()); + Assertions.assertEquals(currentInstant.getEpochSecond(), actualInstant.getEpochSecond()); Files.delete(timestampPath); Files.delete(root); @@ -239,26 +239,26 @@ public void readTimestampFile() throws IOException { @Test public void passNonWindowsLocalPathDwhRootPrefix_returnsFileSeparator() { - Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + Assumptions.assumeFalse(SystemUtils.IS_OS_WINDOWS); // Absolute Path String fs1 = DwhFiles.getFileSeparatorForDwhFiles("/rootDir/prefix"); - Assert.assertEquals(File.separator, fs1); + Assertions.assertEquals(File.separator, fs1); // Relative Path String fs2 = DwhFiles.getFileSeparatorForDwhFiles("baseDir/prefix"); - Assert.assertEquals(File.separator, fs2); + Assertions.assertEquals(File.separator, fs2); } @Test public void passWindowsLocalPathDwhRootPrefix_returnsFileSeparator() { - Assume.assumeTrue(SystemUtils.IS_OS_WINDOWS); + Assumptions.assumeTrue(SystemUtils.IS_OS_WINDOWS); // Absolute Path String fs1 = DwhFiles.getFileSeparatorForDwhFiles("C:\\prefix"); - Assert.assertEquals(File.separator, fs1); + Assertions.assertEquals(File.separator, fs1); String fs2 = DwhFiles.getFileSeparatorForDwhFiles("C:\\rootDir\\prefix"); - Assert.assertEquals(File.separator, fs2); + Assertions.assertEquals(File.separator, fs2); // Relative Path String fs3 = DwhFiles.getFileSeparatorForDwhFiles("baseDir\\prefix"); - Assert.assertEquals(File.separator, fs3); + Assertions.assertEquals(File.separator, fs3); } private void createFile(Path path, byte[] bytes) throws IOException { diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/ParquetUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/ParquetUtilTest.java index 005a7535f..12b421952 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/ParquetUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/ParquetUtilTest.java @@ -36,22 +36,19 @@ import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.QuestionnaireResponse; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.io.TempDir; +import org.mockito.junit.jupiter.MockitoExtension; // TODO add testes for DSTU3 resources too. -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class ParquetUtilTest { private static final String PARQUET_ROOT = "parquet_root"; - private String patientBundle; - private String observationBundle; private ParquetUtil parquetUtil; @@ -60,16 +57,15 @@ public class ParquetUtilTest { private Path rootPath; - @Rule public TemporaryFolder testFolder = new TemporaryFolder(); + @TempDir File temporaryFolder; - @Before + @BeforeEach public void setup() throws IOException, ProfileException { - File rootFolder = testFolder.newFolder(PARQUET_ROOT); + File rootFolder = new File(temporaryFolder, PARQUET_ROOT); rootPath = Paths.get(rootFolder.getPath()); Files.createDirectories(rootPath); AvroConversionUtil.initializeAvroConverters(); - patientBundle = - Resources.toString(Resources.getResource("patient_bundle.json"), StandardCharsets.UTF_8); + observationBundle = Resources.toString( Resources.getResource("observation_bundle.json"), StandardCharsets.UTF_8); From 30956b9600e89b9ab5e5720f6c639b587b500f3c Mon Sep 17 00:00:00 2001 From: Meet Mehta Date: Tue, 3 Sep 2024 21:16:21 -0400 Subject: [PATCH 3/5] Update the Junit5 and Mockito dependency to latest version --- .../com/google/fhir/analytics/FhirEtl.java | 8 +++- .../fhir/analytics/ConvertResourceFnTest.java | 40 ++++++++++++++----- pipelines/common/pom.xml | 4 +- .../google/fhir/analytics/GZipUtilTest.java | 2 +- pipelines/controller/.java-version | 1 + .../fhir/analytics/PipelineManager.java | 5 ++- 6 files changed, 44 insertions(+), 16 deletions(-) create mode 100644 pipelines/controller/.java-version diff --git a/pipelines/batch/src/main/java/com/google/fhir/analytics/FhirEtl.java b/pipelines/batch/src/main/java/com/google/fhir/analytics/FhirEtl.java index bfc23d1ff..759cdde11 100644 --- a/pipelines/batch/src/main/java/com/google/fhir/analytics/FhirEtl.java +++ b/pipelines/batch/src/main/java/com/google/fhir/analytics/FhirEtl.java @@ -514,8 +514,12 @@ static List setupAndBuildPipelines( } public static void main(String[] args) - throws IOException, SQLException, ViewDefinitionException, ProfileException, - ExecutionException, InterruptedException { + throws IOException, + SQLException, + ViewDefinitionException, + ProfileException, + ExecutionException, + InterruptedException { AvroConversionUtil.initializeAvroConverters(); diff --git a/pipelines/batch/src/test/java/com/google/fhir/analytics/ConvertResourceFnTest.java b/pipelines/batch/src/test/java/com/google/fhir/analytics/ConvertResourceFnTest.java index 2bc8c4ba0..dd99ad6d0 100644 --- a/pipelines/batch/src/test/java/com/google/fhir/analytics/ConvertResourceFnTest.java +++ b/pipelines/batch/src/test/java/com/google/fhir/analytics/ConvertResourceFnTest.java @@ -71,8 +71,12 @@ public void setup() throws SQLException, ProfileException { @Test public void testProcessPatientResource_withoutForcedId() - throws IOException, java.text.ParseException, SQLException, PropertyVetoException, - ViewApplicationException, ProfileException { + throws IOException, + java.text.ParseException, + SQLException, + PropertyVetoException, + ViewApplicationException, + ProfileException { String[] args = {"--outputParquetPath=SOME_PATH"}; setUp(args); String patientResourceStr = @@ -96,8 +100,12 @@ public void testProcessPatientResource_withoutForcedId() @Test public void testProcessPatientResource_withForcedId() - throws IOException, java.text.ParseException, SQLException, PropertyVetoException, - ViewApplicationException, ProfileException { + throws IOException, + java.text.ParseException, + SQLException, + PropertyVetoException, + ViewApplicationException, + ProfileException { String[] args = {"--outputParquetPath=SOME_PATH"}; setUp(args); String patientResourceStr = @@ -127,8 +135,12 @@ public void testProcessPatientResource_withForcedId() @Test public void testProcessDeletedPatientResourceFullMode() - throws SQLException, IOException, ParseException, PropertyVetoException, - ViewApplicationException, ProfileException { + throws SQLException, + IOException, + ParseException, + PropertyVetoException, + ViewApplicationException, + ProfileException { String[] args = {"--outputParquetPath=SOME_PATH", "--since="}; setUp(args); // Deleted Patient resource @@ -142,8 +154,12 @@ public void testProcessDeletedPatientResourceFullMode() @Test public void testProcessDeletedPatientResourceIncrementalMode() - throws SQLException, IOException, ParseException, PropertyVetoException, - ViewApplicationException, ProfileException { + throws SQLException, + IOException, + ParseException, + PropertyVetoException, + ViewApplicationException, + ProfileException { String[] args = {"--outputParquetPath=SOME_PATH", "--since=NON-EMPTY"}; setUp(args); // Deleted Patient resource @@ -170,8 +186,12 @@ public void testProcessDeletedPatientResourceIncrementalMode() @Test public void testResourceMetaTags() - throws IOException, java.text.ParseException, SQLException, PropertyVetoException, - ViewApplicationException, ProfileException { + throws IOException, + java.text.ParseException, + SQLException, + PropertyVetoException, + ViewApplicationException, + ProfileException { String[] args = {"--outputParquetPath=SOME_PATH", "--since="}; setUp(args); String patientResourceStr = diff --git a/pipelines/common/pom.xml b/pipelines/common/pom.xml index 538e57ce8..3e04f474f 100644 --- a/pipelines/common/pom.xml +++ b/pipelines/common/pom.xml @@ -254,13 +254,13 @@ org.junit.jupiter junit-jupiter-api - 5.10.1 + 5.11.0 test org.mockito mockito-junit-jupiter - 5.7.0 + 5.13.0 test diff --git a/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java b/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java index 933d8c3fe..25e58ef5c 100644 --- a/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java +++ b/pipelines/common/src/test/java/com/google/fhir/analytics/GZipUtilTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 Google LLC + * Copyright 2020-2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/pipelines/controller/.java-version b/pipelines/controller/.java-version new file mode 100644 index 000000000..8808b7e39 --- /dev/null +++ b/pipelines/controller/.java-version @@ -0,0 +1 @@ +17.0.12 diff --git a/pipelines/controller/src/main/java/com/google/fhir/analytics/PipelineManager.java b/pipelines/controller/src/main/java/com/google/fhir/analytics/PipelineManager.java index f4ad85241..326ae7bb0 100644 --- a/pipelines/controller/src/main/java/com/google/fhir/analytics/PipelineManager.java +++ b/pipelines/controller/src/main/java/com/google/fhir/analytics/PipelineManager.java @@ -369,7 +369,10 @@ DwhRunDetails getLastRunDetails() { // Every 30 seconds, check for pipeline status and incremental pipeline schedule. @Scheduled(fixedDelay = 30000) private void checkSchedule() - throws IOException, PropertyVetoException, SQLException, ViewDefinitionException, + throws IOException, + PropertyVetoException, + SQLException, + ViewDefinitionException, ProfileException { LocalDateTime next = getNextIncrementalTime(); if (next == null) { From 3e24b579c362e9c543acbaf64cd8d088653fdd6d Mon Sep 17 00:00:00 2001 From: Meet Mehta Date: Tue, 3 Sep 2024 21:49:14 -0400 Subject: [PATCH 4/5] Removed .java-version additional file from the project --- pipelines/controller/.java-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 pipelines/controller/.java-version diff --git a/pipelines/controller/.java-version b/pipelines/controller/.java-version deleted file mode 100644 index 8808b7e39..000000000 --- a/pipelines/controller/.java-version +++ /dev/null @@ -1 +0,0 @@ -17.0.12 From bc37de5945a90a995b3a1b11a9016590bf5d5d41 Mon Sep 17 00:00:00 2001 From: Meet Mehta Date: Fri, 25 Oct 2024 21:00:00 -0400 Subject: [PATCH 5/5] Update the configuration in pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 180dee551..bc3bfc428 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ - 1.15.0 + 1.17.0 true