From 3b43130bd826996ee0d972b8d29306a47683255a Mon Sep 17 00:00:00 2001 From: Eli Date: Thu, 19 Feb 2026 08:36:43 -0500 Subject: [PATCH 1/9] moving to a new branch --- .../db/003-odse/routines/010-sp_investigation_event-001.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liquibase-service/src/main/resources/db/003-odse/routines/010-sp_investigation_event-001.sql b/liquibase-service/src/main/resources/db/003-odse/routines/010-sp_investigation_event-001.sql index e925a35c3..7a9b2dce6 100644 --- a/liquibase-service/src/main/resources/db/003-odse/routines/010-sp_investigation_event-001.sql +++ b/liquibase-service/src/main/resources/db/003-odse/routines/010-sp_investigation_event-001.sql @@ -599,9 +599,9 @@ BEGIN phc.program_jurisdiction_oid as case_oid, ooj_initg_agncy_outc_snt_date, init_foll_up as init_fup_initial_foll_up_cd, - (select * + COALESCE((select * from fn_get_value_by_cvg(init_foll_up, - 'STD_CREATE_INV_LABMORB_NONSYPHILIS_PROC_DECISION')) as init_fup_initial_foll_up, + 'STD_CREATE_INV_LABMORB_NONSYPHILIS_PROC_DECISION')), init_foll_up) as init_fup_initial_foll_up, init_foll_up_closed_date as init_fup_closed_dt, internet_foll_up as init_fup_internet_foll_up_cd, (select * from fn_get_value_by_cvg(internet_foll_up, 'YN')) as internet_foll_up, From 1d167099d7182539e5bef48042f43056fed0d4a5 Mon Sep 17 00:00:00 2001 From: Eli Date: Tue, 24 Feb 2026 15:24:10 -0500 Subject: [PATCH 2/9] instructions for running observation service on the host machine --- observation-service/README.md | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 observation-service/README.md diff --git a/observation-service/README.md b/observation-service/README.md new file mode 100644 index 000000000..99084337e --- /dev/null +++ b/observation-service/README.md @@ -0,0 +1,72 @@ +## Observation Service + +### Run on Your Host Machine +The following instructions require that the Kafka and Database containers are running at a minimum. Also note that `application-local.yaml` is included in `.gitignore` so keep this file stored somewhere for reuse. + +1. Create the properties file `src/main/resources/application-local.yaml` and populate with the following content: +```yaml +spring: + kafka: + input: + topic-name: nbs_Observation + topic-name-ar: nbs_Act_relationship + output: + topic-name-reporting: nrt_observation + topic-name-coded: nrt_observation_coded + topic-name-date: nrt_observation_date + topic-name-edx: nrt_observation_edx + topic-name-material: nrt_observation_material + topic-name-numeric: nrt_observation_numeric + topic-name-reason: nrt_observation_reason + topic-name-txt: nrt_observation_txt + dlq: + retry-suffix: _retry + dlq-suffix: _dlt + + bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092} + group-id: ${KAFKA_CONSUMER_APP:observation-reporting-consumer-app} + consumer: + max-retry: 3 + maxPollIntervalMs: 30000 + maxPollRecs: ${KAFKA_CONSUMER_MAX_POLL_RECS:200} + admin: + auto-create: true + application: + name: observation-reporting-service + datasource: + password: ${DB_PASSWORD:PizzaIsGood33!} + username: ${DB_USERNAME:sa} + url: ${DB_HOST:jdbc:sqlserver://localhost:3433;databaseName=NBS_ODSE;encrypt=true;trustServerCertificate=true;} + liquibase: + change-log: db/changelog/db.changelog-master.yaml +featureFlag: + thread-pool-size: ${FF_THREAD_POOL_SIZE:1} +server: + port: "8094" + +management: + endpoint: + prometheus: + access: read_only + endpoints: + web: + exposure: + include: health,info,metrics,prometheus + prometheus: + metrics: + export: + enabled: true + +``` +2. Ensure the `kafka` and `rtr-mssql` containers running. You likely want all your RTR containers running for complete testing! +```shell +docker ps -a -f "name=kafka$" -f "name=rtr-mssql$" +``` +3. In the root of this repository execute the following command so the service uses `application-local.yaml`. +```shell +./gradlew :observation-service:bootRun --args='--spring.profiles.active=local' +``` +4. (Optional) Run the service in debug mode. +```shell +./gradlew :observation-service:bootRun --args='--spring.profiles.active=local' --debug-jvm +``` \ No newline at end of file From 20784f37155d691275b3d7c7ee782ddcda3c920e Mon Sep 17 00:00:00 2001 From: Eli Date: Tue, 24 Feb 2026 15:33:26 -0500 Subject: [PATCH 3/9] instructions for host machine deployment of post processing service added --- post-processing-service/README.md | 106 ++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 post-processing-service/README.md diff --git a/post-processing-service/README.md b/post-processing-service/README.md new file mode 100644 index 000000000..924d4bb3e --- /dev/null +++ b/post-processing-service/README.md @@ -0,0 +1,106 @@ +## Post Processing Service + +### Run on Your Host Machine +The following instructions require that the Kafka and Database containers are running at a minimum. Also note that `application-local.yaml` is included in `.gitignore` so keep this file stored somewhere for reuse. + +1. Create the properties file `src/main/resources/application-local.yaml` and populate with the following content: +```yaml +spring: + kafka: + topic: + investigation: nrt_investigation + observation: nrt_observation + organization: nrt_organization + patient: nrt_patient + provider: nrt_provider + notification: nrt_investigation_notification + treatment: nrt_treatment + case_management: nrt_investigation_case_management + interview: nrt_interview + ldf_data: nrt_ldf_data + place: nrt_place + auth_user: nrt_auth_user + contact_record: nrt_contact + vaccination: nrt_vaccination + page: nrt_odse_NBS_page + datamart: nbs_Datamart + state_defined_field_metadata: nrt_odse_state_defined_field_metadata + condition: nrt_srte_Condition_code + investigation-topic: + topic-name-phc: nbs_Public_health_case + topic-name-ntf: nbs_Notification + topic-name-int: nbs_Interview + topic-name-ctr: nbs_CT_contact + topic-name-vac: nbs_Intervention + topic-name-tmt: nbs_Treatment + topic-name-ar: nbs_Act_relationship + ldf-topic: + topic-name: nbs_state_defined_field_data + observation-topic: + topic-name: nbs_Observation + topic-name-ar: nbs_Act_relationship + organization-topic: + topic-name: ${INPUT_TOPIC_ORGANIZATION:nbs_Organization} + topic-name-place: ${INPUT_TOPIC_PLACE:nbs_Place} + person-topic: + topic-name: ${INPUT_TOPIC_PERSON:nbs_Person} + topic-name-user: ${INPUT_TOPIC_USER:nbs_Auth_user} + dlq: + retry-suffix: -retry + dlq-suffix: -dlt + dlq-suffix-format-2: _dlt + group-id: ${KAFKA_CONSUMER_APP:post-processing-reporting-consumer-app} + dlt-group-id: rtr-dlt-group + bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092} + consumer: + max-retry: 3 + maxPollIntervalMs: 30000 + maxPollRecs: ${KAFKA_CONSUMER_MAX_POLL_RECS:200} + maxConcurrency: 5 + admin: + auto-create: true + application: + name: post-processing-reporting-service + datasource: + password: ${DB_PASSWORD:PizzaIsGood33!} + username: ${DB_USERNAME:sa} + url: ${DB_HOST:jdbc:sqlserver://localhost:3433;databaseName=RDB_MODERN;encrypt=true;trustServerCertificate=true;} + jpa: + properties: + jakarta.persistence.query.timeout: -1 +featureFlag: + service-disable: ${FF_SERVICE_DISABLE:false} +service: + fixed-delay: + cached-ids: ${FIXED_DELAY_ID:20000} + datamart: ${FIXED_DELAY_DM:60000} + backfill: ${FIXED_DELAY_BF:600000} + max-retries: ${MAX_RETRIES:3} +server: + port: "8095" + +management: + endpoint: + prometheus: + access: read_only + endpoints: + web: + exposure: + include: health,info,metrics,prometheus + prometheus: + metrics: + export: + enabled: true +``` +2. Ensure the `kafka` and `rtr-mssql` containers running. You likely want all your RTR containers running for complete testing! +```shell +docker ps -a -f "name=kafka$" -f "name=rtr-mssql$" +``` +3. In the root of this repository execute the following command so the service uses `application-local.yaml`. +```shell +./gradlew :post-processing-service:bootRun --args='--spring.profiles.active=local' +``` +4. (Optional) Run the service in debug mode. +```shell +./gradlew :post-processing-service:bootRun --args='--spring.profiles.active=local' --debug-jvm +``` \ No newline at end of file From b6d81d5cf88c59794fc3426464100fc325f6daa3 Mon Sep 17 00:00:00 2001 From: Eli Date: Wed, 25 Feb 2026 17:39:02 -0500 Subject: [PATCH 4/9] adding result_observation_uid to obsCache; new unit test added for testing new functionality; new README in post processing service --- post-processing-service/README.md | 6 +--- .../service/PostProcessingService.java | 18 ++++++++++ .../PostProcessingServiceEntityTest.java | 33 +++++++++++++++++++ 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/post-processing-service/README.md b/post-processing-service/README.md index 924d4bb3e..f2ef9b9d7 100644 --- a/post-processing-service/README.md +++ b/post-processing-service/README.md @@ -96,11 +96,7 @@ management: ```shell docker ps -a -f "name=kafka$" -f "name=rtr-mssql$" ``` -3. In the root of this repository execute the following command so the service uses `application-local.yaml`. +3. In the root of this repository execute the following command (this service is configured to run in debug mode on port 17070 in `build.gradle` by previous dev team). ```shell ./gradlew :post-processing-service:bootRun --args='--spring.profiles.active=local' -``` -4. (Optional) Run the service in debug mode. -```shell -./gradlew :post-processing-service:bootRun --args='--spring.profiles.active=local' --debug-jvm ``` \ No newline at end of file diff --git a/post-processing-service/src/main/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingService.java b/post-processing-service/src/main/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingService.java index dc71545fc..c1f8feb62 100644 --- a/post-processing-service/src/main/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingService.java +++ b/post-processing-service/src/main/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingService.java @@ -281,6 +281,24 @@ private void extractValFromMessage(Long uid, String topic, String payload) { "Order_rslt")) { obsCache.computeIfAbsent(LAB_REPORT, k -> new ConcurrentLinkedQueue<>()).add(uid); } + + /* + Extract the result observation uid from the Order observation payload since Debezium does not detect + changes for Result lab records on the Observation table. When processObservation is called, this uid + will be in the 'labIds' list and passed into the target sp_d_lab_test_postprocessing stored procedure. + + This is specifically for ELRs so we need to make sure this is associated with an ELR. + */ + JsonNode resUidNode = payloadNode.path("result_observation_uid"); + String electronicInd = payloadNode.path("electronic_ind").asText(); // should always be there + if (resUidNode != null && !Objects.equals(resUidNode.asText(), "") + && domainCd.equalsIgnoreCase("Order") && electronicInd.equalsIgnoreCase("Y")) { + List resUidList = List.of(resUidNode.asText().split(",")); + resUidList.forEach(resUid -> { + Long rUid = Long.valueOf(resUid); + obsCache.computeIfAbsent(LAB_REPORT, k -> new ConcurrentLinkedQueue<>()).add(rUid); + }); + } } } catch (Exception ex) { logger.warn("Error processing ID values for the {} message: {}", topic, ex.getMessage()); diff --git a/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java b/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java index 18c74c311..9189dc901 100644 --- a/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java +++ b/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java @@ -496,6 +496,39 @@ void testPostProcessObservationLab(String payload) { assertTrue(logs.get(9).getMessage().contains(PostProcessingService.SP_EXECUTION_COMPLETED)); } + @ParameterizedTest + @CsvSource({ + "'{\"payload\":{\"observation_uid\":12344, \"obs_domain_cd_st_1\": \"Order\",\"ctrl_cd_display_form\": \"LabReport\",\"result_observation_uid\": 12345, \"electronic_ind\": \"Y\"}}'" + }) + void testPostProcessObservationLabOrderWithResult(String payload) { + String topic = "dummy_observation"; + String key = "{\"payload\":{\"observation_uid\":12344}}"; + + postProcessingServiceMock.processNrtMessage(topic, key, payload); + assertEquals(12344L, postProcessingServiceMock.idCache.get(topic).element()); + assertTrue(postProcessingServiceMock.idCache.containsKey(topic)); + + assertTrue(postProcessingServiceMock.obsCache.containsKey(LAB_REPORT)); + assertTrue(postProcessingServiceMock.obsCache.get(LAB_REPORT).contains(12344L)); + + // The result uid should only be added to the obsCache + assertTrue(postProcessingServiceMock.obsCache.containsKey(LAB_REPORT)); + assertTrue(postProcessingServiceMock.obsCache.get(LAB_REPORT).contains(12345L)); + + postProcessingServiceMock.processCachedIds(); + + String expectedObsIdsString = "12344,12345"; + verify(postProcRepositoryMock).executeStoredProcForLabTest(expectedObsIdsString); + verify(postProcRepositoryMock).executeStoredProcForLabTestResult(expectedObsIdsString); + List logs = listAppender.list; + assertEquals(10, logs.size()); + assertTrue(logs.get(2).getFormattedMessage().contains("sp_d_lab_test_postprocessing")); + assertTrue(logs.get(4).getFormattedMessage().contains("sp_d_labtest_result_postprocessing")); + assertTrue(logs.get(6).getFormattedMessage().contains("sp_lab100_datamart_postprocessing")); + assertTrue(logs.get(8).getFormattedMessage().contains("sp_lab101_datamart_postprocessing")); + assertTrue(logs.get(9).getMessage().contains(PostProcessingService.SP_EXECUTION_COMPLETED)); + } + @ParameterizedTest @CsvSource({ "'{\"payload\":{\"observation_uid\":123, \"obs_domain_cd_st_1\": \"Result\",\"ctrl_cd_display_form\": \"MorbReport\"}}'", From a349a25363ad12541d0178e8f87a52d597390c10 Mon Sep 17 00:00:00 2001 From: Eli Date: Wed, 25 Feb 2026 18:13:49 -0500 Subject: [PATCH 5/9] additional assertion added to make sure idCache does not get the result_observation_uid; only obsCache should have it --- .../service/PostProcessingServiceEntityTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java b/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java index 9189dc901..ae8e490fc 100644 --- a/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java +++ b/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java @@ -514,6 +514,7 @@ void testPostProcessObservationLabOrderWithResult(String payload) { // The result uid should only be added to the obsCache assertTrue(postProcessingServiceMock.obsCache.containsKey(LAB_REPORT)); assertTrue(postProcessingServiceMock.obsCache.get(LAB_REPORT).contains(12345L)); + assertFalse(postProcessingServiceMock.idCache.get(topic).contains(12345L)); postProcessingServiceMock.processCachedIds(); From 11b3e3253c6989627144db4725f27081c749c24e Mon Sep 17 00:00:00 2001 From: eliSkylight Date: Thu, 26 Feb 2026 01:34:32 -0500 Subject: [PATCH 6/9] Change build command to run tests instead of clean build Temporarily changing the command for running tests --- .github/workflows/run-unit-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-unit-tests.yaml b/.github/workflows/run-unit-tests.yaml index 793def3e2..a52bf23d3 100644 --- a/.github/workflows/run-unit-tests.yaml +++ b/.github/workflows/run-unit-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Build and analyze working-directory: ./ run: | - ./gradlew clean build jacocoTestReport + ./gradlew test jacocoTestReport - name: Publish Testing Reports uses: actions/upload-artifact@v6 From 1566c6eff5e46257ec8581164fc95a895fbb79f3 Mon Sep 17 00:00:00 2001 From: eliSkylight Date: Thu, 26 Feb 2026 01:47:03 -0500 Subject: [PATCH 7/9] Revert --- .github/workflows/run-unit-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-unit-tests.yaml b/.github/workflows/run-unit-tests.yaml index a52bf23d3..d1ee12693 100644 --- a/.github/workflows/run-unit-tests.yaml +++ b/.github/workflows/run-unit-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Build and analyze working-directory: ./ run: | - ./gradlew test jacocoTestReport + ./gradlew build clean jacocoTestReport - name: Publish Testing Reports uses: actions/upload-artifact@v6 From 6677cc01132947b9f1fdcd77504614c4bb8ace92 Mon Sep 17 00:00:00 2001 From: eliSkylight Date: Thu, 26 Feb 2026 01:47:28 -0500 Subject: [PATCH 8/9] Reorder Gradle commands in CI workflow --- .github/workflows/run-unit-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-unit-tests.yaml b/.github/workflows/run-unit-tests.yaml index d1ee12693..793def3e2 100644 --- a/.github/workflows/run-unit-tests.yaml +++ b/.github/workflows/run-unit-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Build and analyze working-directory: ./ run: | - ./gradlew build clean jacocoTestReport + ./gradlew clean build jacocoTestReport - name: Publish Testing Reports uses: actions/upload-artifact@v6 From d38111410a47a379afdb866901770c03d5616c3d Mon Sep 17 00:00:00 2001 From: Eli Date: Thu, 26 Feb 2026 17:48:30 -0500 Subject: [PATCH 9/9] unit test not paramaterized anymore; readmes updated for local machine deployment --- observation-service/README.md | 44 ----------- post-processing-service/README.md | 78 ------------------- .../PostProcessingServiceEntityTest.java | 18 +++-- 3 files changed, 13 insertions(+), 127 deletions(-) diff --git a/observation-service/README.md b/observation-service/README.md index 99084337e..7701eb7a4 100644 --- a/observation-service/README.md +++ b/observation-service/README.md @@ -7,56 +7,12 @@ The following instructions require that the Kafka and Database containers are ru ```yaml spring: kafka: - input: - topic-name: nbs_Observation - topic-name-ar: nbs_Act_relationship - output: - topic-name-reporting: nrt_observation - topic-name-coded: nrt_observation_coded - topic-name-date: nrt_observation_date - topic-name-edx: nrt_observation_edx - topic-name-material: nrt_observation_material - topic-name-numeric: nrt_observation_numeric - topic-name-reason: nrt_observation_reason - topic-name-txt: nrt_observation_txt - dlq: - retry-suffix: _retry - dlq-suffix: _dlt - bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092} group-id: ${KAFKA_CONSUMER_APP:observation-reporting-consumer-app} - consumer: - max-retry: 3 - maxPollIntervalMs: 30000 - maxPollRecs: ${KAFKA_CONSUMER_MAX_POLL_RECS:200} - admin: - auto-create: true - application: - name: observation-reporting-service datasource: password: ${DB_PASSWORD:PizzaIsGood33!} username: ${DB_USERNAME:sa} url: ${DB_HOST:jdbc:sqlserver://localhost:3433;databaseName=NBS_ODSE;encrypt=true;trustServerCertificate=true;} - liquibase: - change-log: db/changelog/db.changelog-master.yaml -featureFlag: - thread-pool-size: ${FF_THREAD_POOL_SIZE:1} -server: - port: "8094" - -management: - endpoint: - prometheus: - access: read_only - endpoints: - web: - exposure: - include: health,info,metrics,prometheus - prometheus: - metrics: - export: - enabled: true - ``` 2. Ensure the `kafka` and `rtr-mssql` containers running. You likely want all your RTR containers running for complete testing! ```shell diff --git a/post-processing-service/README.md b/post-processing-service/README.md index f2ef9b9d7..a585c7802 100644 --- a/post-processing-service/README.md +++ b/post-processing-service/README.md @@ -7,90 +7,12 @@ The following instructions require that the Kafka and Database containers are ru ```yaml spring: kafka: - topic: - investigation: nrt_investigation - observation: nrt_observation - organization: nrt_organization - patient: nrt_patient - provider: nrt_provider - notification: nrt_investigation_notification - treatment: nrt_treatment - case_management: nrt_investigation_case_management - interview: nrt_interview - ldf_data: nrt_ldf_data - place: nrt_place - auth_user: nrt_auth_user - contact_record: nrt_contact - vaccination: nrt_vaccination - page: nrt_odse_NBS_page - datamart: nbs_Datamart - state_defined_field_metadata: nrt_odse_state_defined_field_metadata - condition: nrt_srte_Condition_code - investigation-topic: - topic-name-phc: nbs_Public_health_case - topic-name-ntf: nbs_Notification - topic-name-int: nbs_Interview - topic-name-ctr: nbs_CT_contact - topic-name-vac: nbs_Intervention - topic-name-tmt: nbs_Treatment - topic-name-ar: nbs_Act_relationship - ldf-topic: - topic-name: nbs_state_defined_field_data - observation-topic: - topic-name: nbs_Observation - topic-name-ar: nbs_Act_relationship - organization-topic: - topic-name: ${INPUT_TOPIC_ORGANIZATION:nbs_Organization} - topic-name-place: ${INPUT_TOPIC_PLACE:nbs_Place} - person-topic: - topic-name: ${INPUT_TOPIC_PERSON:nbs_Person} - topic-name-user: ${INPUT_TOPIC_USER:nbs_Auth_user} - dlq: - retry-suffix: -retry - dlq-suffix: -dlt - dlq-suffix-format-2: _dlt group-id: ${KAFKA_CONSUMER_APP:post-processing-reporting-consumer-app} - dlt-group-id: rtr-dlt-group bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092} - consumer: - max-retry: 3 - maxPollIntervalMs: 30000 - maxPollRecs: ${KAFKA_CONSUMER_MAX_POLL_RECS:200} - maxConcurrency: 5 - admin: - auto-create: true - application: - name: post-processing-reporting-service datasource: password: ${DB_PASSWORD:PizzaIsGood33!} username: ${DB_USERNAME:sa} url: ${DB_HOST:jdbc:sqlserver://localhost:3433;databaseName=RDB_MODERN;encrypt=true;trustServerCertificate=true;} - jpa: - properties: - jakarta.persistence.query.timeout: -1 -featureFlag: - service-disable: ${FF_SERVICE_DISABLE:false} -service: - fixed-delay: - cached-ids: ${FIXED_DELAY_ID:20000} - datamart: ${FIXED_DELAY_DM:60000} - backfill: ${FIXED_DELAY_BF:600000} - max-retries: ${MAX_RETRIES:3} -server: - port: "8095" - -management: - endpoint: - prometheus: - access: read_only - endpoints: - web: - exposure: - include: health,info,metrics,prometheus - prometheus: - metrics: - export: - enabled: true ``` 2. Ensure the `kafka` and `rtr-mssql` containers running. You likely want all your RTR containers running for complete testing! ```shell diff --git a/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java b/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java index ae8e490fc..6f19bd6ff 100644 --- a/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java +++ b/post-processing-service/src/test/java/gov/cdc/etldatapipeline/postprocessingservice/service/PostProcessingServiceEntityTest.java @@ -496,13 +496,21 @@ void testPostProcessObservationLab(String payload) { assertTrue(logs.get(9).getMessage().contains(PostProcessingService.SP_EXECUTION_COMPLETED)); } - @ParameterizedTest - @CsvSource({ - "'{\"payload\":{\"observation_uid\":12344, \"obs_domain_cd_st_1\": \"Order\",\"ctrl_cd_display_form\": \"LabReport\",\"result_observation_uid\": 12345, \"electronic_ind\": \"Y\"}}'" - }) - void testPostProcessObservationLabOrderWithResult(String payload) { + + void testPostProcessObservationLabOrderWithResult() { String topic = "dummy_observation"; String key = "{\"payload\":{\"observation_uid\":12344}}"; + String payload = """ + { + "payload": { + "observation_uid": 12344, + "obs_domain_cd_st_1": "Order", + "ctrl_cd_display_form": "LabReport", + "result_observation_uid": 12345, + "electronic_ind": "Y" + } + } + """; postProcessingServiceMock.processNrtMessage(topic, key, payload); assertEquals(12344L, postProcessingServiceMock.idCache.get(topic).element());