drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prog...@apache.org
Subject [1/5] drill git commit: DRILL-5895: Add logging mongod exception when failed to close all mongod processes during provided timeout
Date Mon, 30 Oct 2017 21:14:07 GMT
Repository: drill
Updated Branches:
  refs/heads/master 5a215144d -> 4a718a0bd


DRILL-5895: Add logging mongod exception when failed to close all mongod processes during
provided timeout

closes #1006


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

Branch: refs/heads/master
Commit: c8d01b3141b0b755d4311340c3e5823214332c70
Parents: 5a21514
Author: Volodymyr Tkach <vovatkach75@gmail.com>
Authored: Mon Oct 23 09:10:57 2017 +0000
Committer: Paul Rogers <progers@maprtech.com>
Committed: Mon Oct 30 13:23:09 2017 -0700

----------------------------------------------------------------------
 .../drill/exec/store/mongo/MongoTestSuit.java      | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/c8d01b31/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
----------------------------------------------------------------------
diff --git a/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
b/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
index 122d52a..7e2782c 100644
--- a/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
+++ b/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -87,14 +87,14 @@ public class MongoTestSuit implements MongoTestConstants {
 
     private static void setup() throws Exception {
       // creating configServers
-      List<IMongodConfig> configServers = new ArrayList<IMongodConfig>(1);
+      List<IMongodConfig> configServers = new ArrayList<>(1);
       IMongodConfig configIMongodConfig = crateConfigServerConfig(
           CONFIG_SERVER_PORT, true);
       configServers.add(configIMongodConfig);
 
       // creating replicaSets
-      Map<String, List<IMongodConfig>> replicaSets = new HashMap<String, List<IMongodConfig>>();
-      List<IMongodConfig> replicaSet1 = new ArrayList<IMongodConfig>();
+      Map<String, List<IMongodConfig>> replicaSets = new HashMap<>();
+      List<IMongodConfig> replicaSet1 = new ArrayList<>();
       replicaSet1.add(crateIMongodConfig(MONGOD_1_PORT, false,
           REPLICA_SET_1_NAME));
       replicaSet1.add(crateIMongodConfig(MONGOD_2_PORT, false,
@@ -102,7 +102,7 @@ public class MongoTestSuit implements MongoTestConstants {
       replicaSet1.add(crateIMongodConfig(MONGOD_3_PORT, false,
           REPLICA_SET_1_NAME));
       replicaSets.put(REPLICA_SET_1_NAME, replicaSet1);
-      List<IMongodConfig> replicaSet2 = new ArrayList<IMongodConfig>();
+      List<IMongodConfig> replicaSet2 = new ArrayList<>();
       replicaSet2.add(crateIMongodConfig(MONGOD_4_PORT, false,
           REPLICA_SET_2_NAME));
       replicaSet2.add(crateIMongodConfig(MONGOD_5_PORT, false,
@@ -170,7 +170,12 @@ public class MongoTestSuit implements MongoTestConstants {
 
     private static void cleanup() {
       if (mongosTestFactory != null) {
-        mongosTestFactory.stop();
+        // ignoring exception because sometimes provided time isn't enough to stop mongod
processes
+        try {
+            mongosTestFactory.stop();
+          } catch (IllegalStateException e) {
+            logger.warn("Failed to close all mongod processes during provided timeout", e);
+          }
       }
     }
 


Mime
View raw message