From 3bb3630c96dbc44ff31b3531e3300d0f5c6fcc1f Mon Sep 17 00:00:00 2001 From: Erich Reiter Date: Tue, 12 Nov 2024 06:22:16 -0500 Subject: [PATCH] CMR-10141-1: Fixing broken build --- metadata-db-app/int-test/cmr/metadata_db/int_test/utility.clj | 4 +++- .../src/cmr/metadata_db/services/sub_notifications.clj | 4 +++- .../ingest/subscription/subscription_processing_test.clj | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/metadata-db-app/int-test/cmr/metadata_db/int_test/utility.clj b/metadata-db-app/int-test/cmr/metadata_db/int_test/utility.clj index 1028bf6dc6..d0191b41d0 100644 --- a/metadata-db-app/int-test/cmr/metadata_db/int_test/utility.clj +++ b/metadata-db-app/int-test/cmr/metadata_db/int_test/utility.clj @@ -391,7 +391,9 @@ (is (= (dissoc (expected-concept concept) :coll-concept-id) (dissoc stored-concept :revision-date :transaction-id :created-at :coll-concept-id))) (is (= (expected-concept concept) - (dissoc stored-concept :revision-date :transaction-id :created-at)))))) + (util/dissoc-in + (dissoc stored-concept :revision-date :transaction-id :created-at) + [:extra-fields :aws-arn])))))) (defn is-tag-association-deleted? "Returns if the ta is marked as deleted in metadata-db" diff --git a/metadata-db-app/src/cmr/metadata_db/services/sub_notifications.clj b/metadata-db-app/src/cmr/metadata_db/services/sub_notifications.clj index 2e3620a3e9..990b29750b 100644 --- a/metadata-db-app/src/cmr/metadata_db/services/sub_notifications.clj +++ b/metadata-db-app/src/cmr/metadata_db/services/sub_notifications.clj @@ -15,7 +15,9 @@ (if (sub-note/subscription-exists? db subscription-id) (if (sub-note/sub-notification-exists? db subscription-id) (sub-note/update-sub-notification db subscription-id last-notified-time) - (sub-note/save-sub-notification db subscription-id)) + (do + (sub-note/save-sub-notification db subscription-id) + (sub-note/update-sub-notification db subscription-id last-notified-time))) (errors/throw-service-error :not-found (msg/subscription-not-found subscription-id)))) (defn update-subscription-notification diff --git a/system-int-test/test/cmr/system_int_test/ingest/subscription/subscription_processing_test.clj b/system-int-test/test/cmr/system_int_test/ingest/subscription/subscription_processing_test.clj index ea11b8463d..205b628619 100644 --- a/system-int-test/test/cmr/system_int_test/ingest/subscription/subscription_processing_test.clj +++ b/system-int-test/test/cmr/system_int_test/ingest/subscription/subscription_processing_test.clj @@ -172,7 +172,7 @@ params {:revision-date-range (str "2016-01-02T00:00:00Z," (t/now))} _manual-endpoint (jobs/trigger-email-subscription-processing system-context params) postjob-subscriptions (get-subscriptions)] - (is (some? (get-in (first prejob-subscriptions) [:extra-fields :last-notified-at]))) + (is (nil? (get-in (first prejob-subscriptions) [:extra-fields :last-notified-at]))) (is (= prejob-subscriptions postjob-subscriptions)))))))) (deftest ^:oracle subscription-email-processing-time-constraint-test