drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5196) Could not run a single MongoDB unit test case through command line or IDE
Date Sat, 04 Feb 2017 00:55:51 GMT

    [ 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)

Mime
View raw message