drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #741: DRILL-5196: init MongoDB cluster when run a single ...
Date Sat, 04 Feb 2017 00:54:56 GMT
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) { ...
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message