From 198b14213ee92b11c36c9a15667f03fc5c0d454a Mon Sep 17 00:00:00 2001
From: Rostislav_Dublin <Rostislav_Dublin@epam.com>
Date: Thu, 2 Dec 2021 13:42:23 +0300
Subject: [PATCH] All done. All ITs pass on both PubSub and Mq

---
 provider/notification-gcp/pom.xml                        | 5 -----
 .../gcp/mappers/oqm/MqTenantOqmDestinationResolver.java  | 9 ++++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/provider/notification-gcp/pom.xml b/provider/notification-gcp/pom.xml
index 62825fe28..9079b7f37 100644
--- a/provider/notification-gcp/pom.xml
+++ b/provider/notification-gcp/pom.xml
@@ -37,11 +37,6 @@
     </properties>
 
     <dependencies>
-        <dependency>
-            <groupId>org.opengroup.osdu</groupId>
-            <artifactId>osm</artifactId>
-            <version>0.13.0-SNAPSHOT</version>
-        </dependency>
         <dependency>
             <groupId>org.opengroup.osdu</groupId>
             <artifactId>oqm</artifactId>
diff --git a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/mappers/oqm/MqTenantOqmDestinationResolver.java b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/mappers/oqm/MqTenantOqmDestinationResolver.java
index a9191aaf5..5c6edf6da 100644
--- a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/mappers/oqm/MqTenantOqmDestinationResolver.java
+++ b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/mappers/oqm/MqTenantOqmDestinationResolver.java
@@ -12,7 +12,6 @@ import org.opengroup.osdu.core.common.partition.Property;
 import org.opengroup.osdu.core.gcp.oqm.driver.OqmDriverRuntimeException;
 import org.opengroup.osdu.core.gcp.oqm.driver.rabbitmq.MqOqmDestinationResolution;
 import org.opengroup.osdu.core.gcp.oqm.model.OqmDestination;
-import org.opengroup.osdu.core.gcp.osm.translate.TranslatorRuntimeException;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Component;
@@ -62,8 +61,8 @@ public class MqTenantOqmDestinationResolver implements org.opengroup.osdu.core.g
 
     private final IPartitionProvider partitionProvider;
 
-    private Map<String, ConnectionFactory> amqpConnectionFactoryCache = new HashMap<>();
-    private Map<String, Client> httpClientCache = new HashMap<>();
+    private final Map<String, ConnectionFactory> amqpConnectionFactoryCache = new HashMap<>();
+    private final Map<String, Client> httpClientCache = new HashMap<>();
 
     @Override
     public MqOqmDestinationResolution resolve(OqmDestination destination) {
@@ -85,7 +84,7 @@ public class MqTenantOqmDestinationResolver implements org.opengroup.osdu.core.g
                     try {
                         partitionInfo = partitionProvider.get(partitionId);
                     } catch (PartitionException e) {
-                        throw new TranslatorRuntimeException(e, "Partition '{}' destination resolution issue", destination.getPartitionId());
+                        throw new OqmDriverRuntimeException(e, "Partition '{}' destination resolution issue", destination.getPartitionId());
                     }
                     Map<String, Property> partitionProperties = partitionInfo.getProperties();
 
@@ -142,7 +141,7 @@ public class MqTenantOqmDestinationResolver implements org.opengroup.osdu.core.g
     private String getPartitionProperty(String partitionId, Map<String, Property> partitionProperties, String propertyName) {
         String fullName = properties.getPartitionPropertiesPrefix().concat(propertyName);
         return Optional.ofNullable(partitionProperties.get(fullName)).map(Property::getValue).map(Object::toString)
-                .orElseThrow(() -> new TranslatorRuntimeException(null,
+                .orElseThrow(() -> new OqmDriverRuntimeException(null,
                         "Partition '{}' RabbitMQ OQM destination resolution configuration issue. Property '{}' is not provided in PartitionInfo.",
                         partitionId, fullName));
     }
-- 
GitLab