You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by eiri <gi...@git.apache.org> on 2017/01/05 21:34:43 UTC

[GitHub] couchdb-couch pull request #220: Fix couchdb_views tests

GitHub user eiri opened a pull request:

    https://github.com/apache/couchdb-couch/pull/220

    Fix couchdb_views tests

    Previous commit made couch_file to monitor db_pid instead of linking to it, so number of `monitored_by` for couch_db process, checked in `couchdb_views_tests`, changed.
    
    COUCHDB-3259

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch fix-views_tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/220.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #220
    
----
commit 7a5a1a9732abaaa47b90b090c17c72c161e0bad0
Author: Eric Avdey <ei...@eiri.ca>
Date:   2017-01-05T21:30:00Z

    Fix couchdb_views tests
    
    Previous commit made couch_file to monitor db_pid
    instead of linking ot it, so number of monitored_by
    for couch_db process, checked in couchdb_views_tests,
    changed.
    
    COUCHDB-3259

----


---
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.
---

[GitHub] couchdb-couch issue #220: Fix couchdb_views tests

Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on the issue:

    https://github.com/apache/couchdb-couch/pull/220
  
    Tests pass locally. +1
    ```
    ======================== EUnit ========================
    module 'couchdb_views_tests'
      View indexes cleanup
        couchdb_views_tests:214: should_have_two_indexes_alive_before_deletion...ok
        couchdb_views_tests:219: should_cleanup_index_file_after_ddoc_deletion...ok
        couchdb_views_tests:225: should_cleanup_all_index_files...ok
        [done in 0.426 s]
      View group db leaks
        couchdb_views_tests:228: couchdb_1138...[0.254 s] ok
        couchdb_views_tests:266: couchdb_1309...[0.043 s] ok
        [done in 0.404 s]
      View group shutdown
        couchdb_views_tests:315: couchdb_1283...[0.187 s] ok
        [done in 0.190 s]
      Upgrade and bugs related tests
        couchdb_views_tests:159: should_not_remember_docs_in_index_after_backup_restore...[0.029 s] ok
        [done in 0.097 s]
      Upgrade tests
        couchdb_views_tests:181: should_upgrade_legacy_view_files...[2.055 s] ok
        [done in 2.066 s]
      [done in 4.816 s]
    =======================================================
      All 8 tests passed.
    ```


---
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.
---

[GitHub] couchdb-couch issue #220: Fix couchdb_views tests

Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on the issue:

    https://github.com/apache/couchdb-couch/pull/220
  
    @eiri: I am concerned that in some case we change `2 -> 3` and in other `2 -> 4`. I understand the reason for this though. However strictly speaking couch_file process is not a user of a db. Wouldn't it be better to change count_users function to account for additional monitors? Following works locally:
    ```
     count_users(DbName) ->
         {ok, Db} = couch_db:open_int(DbName, [?ADMIN_CTX]),
         {monitored_by, Monitors} = erlang:process_info(Db#db.main_pid, monitored_by),
    +    CouchFiles = [P || P <- Monitors, couch_file:process_info(P) =/= undefined],
         ok = couch_db:close(Db),
    -    length(lists:usort(Monitors) -- [self()]).
    +    length(lists:usort(Monitors) -- [self() | CouchFiles]).
    ```


---
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.
---

[GitHub] couchdb-couch pull request #220: Fix couchdb_views tests

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/220


---
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.
---

[GitHub] couchdb-couch issue #220: Fix couchdb_views tests

Posted by eiri <gi...@git.apache.org>.
Github user eiri commented on the issue:

    https://github.com/apache/couchdb-couch/pull/220
  
    @iilyak yes, this seems to be a better approach, updated.


---
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.
---