Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
537f6e31
Commit
537f6e31
authored
8 years ago
by
nixonrodrigues
Committed by
Madhan Neethiraj
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1666: fix for IT failures caused by earlier commit
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
bec9370e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ActiveInstanceElectorServiceTest.java
...e/atlas/web/service/ActiveInstanceElectorServiceTest.java
+4
-4
No files found.
webapp/src/test/java/org/apache/atlas/web/service/ActiveInstanceElectorServiceTest.java
View file @
537f6e31
...
@@ -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
AtlasBase
Exception
()).
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
AtlasBase
Exception
()).
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
AtlasBase
Exception
()).
when
(
activeInstanceState
).
update
(
"id1"
);
ActiveInstanceElectorService
activeInstanceElectorService
=
ActiveInstanceElectorService
activeInstanceElectorService
=
new
ActiveInstanceElectorService
(
configuration
,
new
ArrayList
(),
new
ActiveInstanceElectorService
(
configuration
,
new
ArrayList
(),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment