atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject atlas git commit: ATLAS-2048: Fix for Unit test failure on 0.8-incubating branch
Date Fri, 18 Aug 2017 01:01:44 GMT
Repository: atlas
Updated Branches:
  refs/heads/master a9514d4b1 -> e80b6c360


ATLAS-2048: Fix for Unit test failure on 0.8-incubating branch

Signed-off-by: Sarath Subramanian <ssubramanian@hortonworks.com>
(cherry picked from commit 8967f0cf62cae4c6d6215a7fb4fc0b1d7bac9789)


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/e80b6c36
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/e80b6c36
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/e80b6c36

Branch: refs/heads/master
Commit: e80b6c360c3a5b255d822d0dc006d89a5eba530d
Parents: a9514d4
Author: nixonrodrigues <nixon@apache.org>
Authored: Wed Aug 16 11:58:10 2017 -0700
Committer: Sarath Subramanian <ssubramanian@hortonworks.com>
Committed: Thu Aug 17 18:01:26 2017 -0700

----------------------------------------------------------------------
 .../NotificationHookConsumerKafkaTest.java      | 26 ++------------------
 1 file changed, 2 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/e80b6c36/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
index 1a3c413..eb37fa8 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
@@ -100,30 +100,8 @@ public class NotificationHookConsumerKafkaTest {
             produceMessage(new HookNotification.EntityCreateRequest("test_user1", createEntity()));
 
             NotificationConsumer<HookNotificationMessage> consumer = createNewConsumer(kafkaNotification,
false);
-            NotificationHookConsumer notificationHookConsumer = new NotificationHookConsumer(notificationInterface,
atlasEntityStore, serviceState, instanceConverter, typeRegistry);
-            NotificationHookConsumer.HookConsumer hookConsumer = notificationHookConsumer.new
HookConsumer(consumer);
-
-            consumeOneMessage(consumer, hookConsumer);
-            verify(atlasEntityStore).createOrUpdate(any(EntityStream.class), anyBoolean());
-
-            // produce another message, and make sure it moves ahead. If commit succeeded,
this would work.
-            produceMessage(new HookNotification.EntityCreateRequest("test_user2", createEntity()));
-            consumeOneMessage(consumer, hookConsumer);
-            verify(atlasEntityStore,times(2)).createOrUpdate(any(EntityStream.class), anyBoolean());
-            reset(atlasEntityStore);
-        }
-        finally {
-            kafkaNotification.close();
-        }
-    }
-
-    @Test
-    public void testConsumerConsumesNewMessageWithAutoCommitDisabled1() throws AtlasException,
InterruptedException, AtlasBaseException {
-        try {
-            produceMessage(new HookNotification.EntityCreateRequest("test_user1", createEntity()));
-
-            NotificationConsumer<HookNotificationMessage> consumer = createNewConsumer(kafkaNotification,
false);
-            NotificationHookConsumer notificationHookConsumer = new NotificationHookConsumer(notificationInterface,
atlasEntityStore, serviceState, instanceConverter, typeRegistry);
+            NotificationHookConsumer notificationHookConsumer =
+                    new NotificationHookConsumer(notificationInterface, atlasEntityStore,
serviceState, instanceConverter, typeRegistry);
             NotificationHookConsumer.HookConsumer hookConsumer = notificationHookConsumer.new
HookConsumer(consumer);
 
             consumeOneMessage(consumer, hookConsumer);


Mime
View raw message