Commit 537f6e31 by nixonrodrigues Committed by Madhan Neethiraj

ATLAS-1666: fix for IT failures caused by earlier commit

parent bec9370e
...@@ -34,7 +34,7 @@ import org.testng.annotations.Test; ...@@ -34,7 +34,7 @@ import org.testng.annotations.Test;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import org.apache.atlas.exception.AtlasBaseException;
import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
...@@ -268,7 +268,7 @@ public class ActiveInstanceElectorServiceTest { ...@@ -268,7 +268,7 @@ public class ActiveInstanceElectorServiceTest {
} }
}); });
doThrow(new Exception()).when(activeInstanceState).update("id1"); doThrow(new AtlasBaseException()).when(activeInstanceState).update("id1");
ActiveInstanceElectorService activeInstanceElectorService = ActiveInstanceElectorService activeInstanceElectorService =
new ActiveInstanceElectorService(configuration, changeHandlers, curatorFactory, new ActiveInstanceElectorService(configuration, changeHandlers, curatorFactory,
...@@ -294,7 +294,7 @@ public class ActiveInstanceElectorServiceTest { ...@@ -294,7 +294,7 @@ public class ActiveInstanceElectorServiceTest {
LeaderLatch leaderLatch = mock(LeaderLatch.class); LeaderLatch leaderLatch = mock(LeaderLatch.class);
when(curatorFactory.leaderLatchInstance("id1", HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)).thenReturn(leaderLatch); 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 = ActiveInstanceElectorService activeInstanceElectorService =
new ActiveInstanceElectorService(configuration, new ArrayList(), curatorFactory, new ActiveInstanceElectorService(configuration, new ArrayList(), curatorFactory,
...@@ -392,7 +392,7 @@ public class ActiveInstanceElectorServiceTest { ...@@ -392,7 +392,7 @@ public class ActiveInstanceElectorServiceTest {
LeaderLatch leaderLatch = mock(LeaderLatch.class); LeaderLatch leaderLatch = mock(LeaderLatch.class);
when(curatorFactory.leaderLatchInstance("id1", HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)).thenReturn(leaderLatch); 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 = ActiveInstanceElectorService activeInstanceElectorService =
new ActiveInstanceElectorService(configuration, new ArrayList(), new ActiveInstanceElectorService(configuration, new ArrayList(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment