Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 039F5200C1F for ; Sat, 4 Feb 2017 01:55:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 020BC160B55; Sat, 4 Feb 2017 00:55:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4D983160B3F for ; Sat, 4 Feb 2017 01:55:55 +0100 (CET) Received: (qmail 95309 invoked by uid 500); 4 Feb 2017 00:55:54 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 95298 invoked by uid 99); 4 Feb 2017 00:55:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2017 00:55:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id ED935C1A2E for ; Sat, 4 Feb 2017 00:55:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id UCT01oNKMrwJ for ; Sat, 4 Feb 2017 00:55:53 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E82F05F30D for ; Sat, 4 Feb 2017 00:55:52 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D4A50E02D5 for ; Sat, 4 Feb 2017 00:55:51 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9230C2528D for ; Sat, 4 Feb 2017 00:55:51 +0000 (UTC) Date: Sat, 4 Feb 2017 00:55:51 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5196) Could not run a single MongoDB unit test case through command line or IDE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 04 Feb 2017 00:55:56 -0000 [ https://issues.apache.org/jira/browse/DRILL-5196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852411#comment-15852411 ] ASF GitHub Bot commented on DRILL-5196: --------------------------------------- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/741#discussion_r99451485 --- 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 -- Move to top of function? ``` if (mongoClient==null) { return; } if (initCount.decrementAndGet() == 0) { ... ``` > Could not run a single MongoDB unit test case through command line or IDE > ------------------------------------------------------------------------- > > Key: DRILL-5196 > URL: https://issues.apache.org/jira/browse/DRILL-5196 > Project: Apache Drill > Issue Type: Bug > Reporter: Chunhui Shi > Assignee: Chunhui Shi > > Could not run a single MongoDB's unit test through IDE or command line. The reason is when running a single test case, the MongoDB instance did not get started thus a 'table not found' error for 'mongo.employee.empinfo' would be raised. -- This message was sent by Atlassian JIRA (v6.3.15#6346)