Repository: incubator-atlas Updated Branches: refs/heads/0.8-incubating 298fdb9d2 -> e8d1d523a
ATLAS-1666: fix for IT failures caused by earlier commit Signed-off-by: Madhan Neethiraj <[email protected]> (cherry picked from commit 537f6e31f00f3406a6eb1a03a0f1223ce74ba9a4) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/4376678e Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/4376678e Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/4376678e Branch: refs/heads/0.8-incubating Commit: 4376678e06c7f8d2e3993fe5848d46d47ff8315c Parents: 298fdb9 Author: nixonrodrigues <[email protected]> Authored: Sat Mar 18 17:17:13 2017 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Sat Mar 18 19:40:36 2017 -0700 ---------------------------------------------------------------------- .../atlas/web/service/ActiveInstanceElectorServiceTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/4376678e/webapp/src/test/java/org/apache/atlas/web/service/ActiveInstanceElectorServiceTest.java ---------------------------------------------------------------------- diff --git a/webapp/src/test/java/org/apache/atlas/web/service/ActiveInstanceElectorServiceTest.java b/webapp/src/test/java/org/apache/atlas/web/service/ActiveInstanceElectorServiceTest.java index c0ffc6e..d1b0318 100644 --- a/webapp/src/test/java/org/apache/atlas/web/service/ActiveInstanceElectorServiceTest.java +++ b/webapp/src/test/java/org/apache/atlas/web/service/ActiveInstanceElectorServiceTest.java @@ -34,7 +34,7 @@ import org.testng.annotations.Test; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; - +import org.apache.atlas.exception.AtlasBaseException; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; @@ -268,7 +268,7 @@ public class ActiveInstanceElectorServiceTest { } }); - doThrow(new Exception()).when(activeInstanceState).update("id1"); + doThrow(new AtlasBaseException()).when(activeInstanceState).update("id1"); ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, changeHandlers, curatorFactory, @@ -294,7 +294,7 @@ public class ActiveInstanceElectorServiceTest { LeaderLatch leaderLatch = mock(LeaderLatch.class); when(curatorFactory.leaderLatchInstance("id1", HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)).thenReturn(leaderLatch); - doThrow(new Exception()).when(activeInstanceState).update("id1"); + doThrow(new AtlasBaseException()).when(activeInstanceState).update("id1"); ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, new ArrayList(), curatorFactory, @@ -392,7 +392,7 @@ public class ActiveInstanceElectorServiceTest { LeaderLatch leaderLatch = mock(LeaderLatch.class); when(curatorFactory.leaderLatchInstance("id1", HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)).thenReturn(leaderLatch); - doThrow(new Exception()).when(activeInstanceState).update("id1"); + doThrow(new AtlasBaseException()).when(activeInstanceState).update("id1"); ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, new ArrayList(),
