Skip to content

Commit 2c09b15

Browse files
author
Vasile Baluta
committed
try to fix tests
1 parent 3b14f4f commit 2c09b15

File tree

8 files changed

+15
-12
lines changed

8 files changed

+15
-12
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ before_install:
99
- chmod +x pom.xml
1010

1111
script:
12-
- rm /home/travis/.embedmongo/extracted/Linux-B64--3.4.1/extractmongod
1312
- mvn clean install

src/test/java/com/ericsson/ei/flowtests/FlowTestConfigs.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,11 @@ public void tearDown() {
8080
// exception and go on
8181
}
8282

83-
if (testsFactory != null)
84-
testsFactory.shutdown();
8583
if (mongoClient != null)
8684
mongoClient.close();
85+
if (testsFactory != null)
86+
testsFactory.shutdown();
87+
8788
}
8889

8990
void createExchange(final String exchangeName, final String queueName) {

src/test/java/com/ericsson/ei/handlers/test/ObjectHandlerTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ public void test() {
107107
@After
108108
public void dropCollection() {
109109
mongoDBHandler.dropDocument(dataBaseName, collectionName, condition);
110-
if (testsFactory != null)
111-
testsFactory.shutdown();
112110
if (mongoClient != null)
113111
mongoClient.close();
112+
if (testsFactory != null)
113+
testsFactory.shutdown();
114+
114115
}
115116
}

src/test/java/com/ericsson/ei/mongoDBHandler/test/MongoDBHandlerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public void testUpdateDocument() {
9090
@After
9191
public void dropCollection() {
9292
assertTrue(mongoDBHandler.dropDocument(dataBaseName, collectionName, condition));
93-
testsFactory.shutdown();
9493
mongoClient.close();
94+
testsFactory.shutdown();
95+
9596
}
9697
}

src/test/java/com/ericsson/ei/queryservice/test/QueryServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ record = (ObjectNode) tempRecord;
181181

182182
@AfterClass
183183
public static void tearDown() throws Exception {
184-
if (testsFactory != null)
185-
testsFactory.shutdown();
186184
if (mongoClient != null)
187185
mongoClient.close();
186+
if (testsFactory != null)
187+
testsFactory.shutdown();
188188
}
189189

190190
}

src/test/java/com/ericsson/ei/rules/test/TestRulesService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public void initMocks() {
5656

5757
@AfterClass
5858
public static void tearDownMongoDB() throws Exception {
59-
testsFactory.shutdown();
6059
mongoClient.close();
60+
testsFactory.shutdown();
6161
}
6262

6363
@Test

src/test/java/com/ericsson/ei/subscription/SubscriptionServiceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ public void init() {
9191

9292
@AfterClass
9393
public static void tearDownMongoDB() throws Exception {
94-
if (testsFactory != null)
95-
testsFactory.shutdown();
9694
if (mongoClient != null)
9795
mongoClient.close();
96+
if (testsFactory != null)
97+
testsFactory.shutdown();
98+
9899
}
99100

100101
@Test

src/test/java/com/ericsson/ei/subscriptionhandler/test/SubscriptionHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ public static void init() throws Exception {
129129

130130
@AfterClass
131131
public static void close() {
132-
testsFactory.shutdown();
133132
mongoClient.close();
133+
testsFactory.shutdown();
134134
}
135135

136136
@PostConstruct

0 commit comments

Comments
 (0)