Github user chunhui-shi commented on a diff in the pull request: https://github.com/apache/drill/pull/741#discussion_r99453293 --- Diff: contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java --- @@ -234,15 +243,25 @@ private static void createDbAndCollections(String dbName, @AfterClass public static void tearDownCluster() throws Exception { - if (mongoClient != null) { - mongoClient.dropDatabase(EMPLOYEE_DB); - mongoClient.close(); - } synchronized (MongoTestSuit.class) { - if (distMode) { - DistributedMode.cleanup(); - } else { - SingleMode.cleanup(); + if (initCount.decrementAndGet() == 0) { + try { + if (mongoClient != null) { --- End diff -- Then we will end up not to cleanup the cluster if mongoClient for some reason was set to null? I think it is better leave it as is.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---