GitHub user wohali opened a pull request:

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

    Disable should_process_waiting_queue_as_fifo test

    COUCHDB-3140
    
    This PR disables the problematic queue-as-fifo test. As written, any
    call in a test to spawn_client/1 returns immediately, and does not
    guarantee that the call to couch_query_servers:get_ddoc_process/2
    returns before control flow proceeds to the next line in the eunit test.
    As it turns out, on Windows, the call to spawn_client for ddoc5 succeeds
    prior to the ddoc4 call in this test, thus always failing.
    
    Insertion of a timer:sleep/1 call between the spawn_client/1 calls seems
    to solve the problem, but even this is "lucky" behaviour. Semantically
    the way this test is written, with spawn_client/1 using spawn/1 to spin
    off the actual get_ddoc_process/2 call, there is no guarantee that the
    couch_proc_manager FIFO queue is being populated correctly.
    
    Further, if the get_ddoc_process/2 call takes longer than the defined
    timeout (5000 ms) this test will always fail, as no provision is made to
    keep trying for an os_process after that time. Again we are "lucky" that
    the test runs fast enough that this is not a problem, but relying on a
    performant BEAM VM for test success in any regard is equally
    problematic.
    
    For this reason I am completely commenting out this test until the
    harness can be fixed. I believe the impact to couchdb is minimal.
    
    (It also suggests we may want to rethink how requests for os processes
    are queued and issued at some point in the future; this approach seems
    sub-optimal, especially if strict FIFO ordering is an expectation of the
    system.)
    
    /cc @eiri @rnewson @janl

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

    $ git pull https://github.com/wohali/couchdb-couch 
3140-disable-queue-as-fifo-test

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

    https://github.com/apache/couchdb-couch/pull/196.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 #196
    
----
commit ac7435c334eae2b8454fa6d0b6a1154bca8f6874
Author: Joan Touzet <woh...@atypical.net>
Date:   2016-09-11T06:24:40Z

    Disable should_process_waiting_queue_as_fifo test
    
    COUCHDB-3140
    
    This PR disables the problematic queue-as-fifo test. As written, any
    call in a test to spawn_client/1 returns immediately, and does not
    guarantee that the call to couch_query_servers:get_ddoc_process/2
    returns before control flow proceeds to the next line in the eunit test.
    As it turns out, on Windows, the call to spawn_client for ddoc5 succeeds
    prior to the ddoc4 call in this test, thus always failing.
    
    Insertion of a timer:sleep/1 call between the spawn_client/1 calls seems
    to solve the problem, but even this is "lucky" behaviour. Semantically
    the way this test is written, with spawn_client/1 using spawn/1 to spin
    off the actual get_ddoc_process/2 call, there is no guarantee that the
    couch_proc_manager FIFO queue is being populated correctly.
    
    Further, if the get_ddoc_process/2 call takes longer than the defined
    timeout (5000 ms) this test will always fail, as no provision is made to
    keep trying for an os_process after that time. Again we are "lucky" that
    the test runs fast enough that this is not a problem, but relying on a
    performant BEAM VM for test success in any regard is equally
    problematic.
    
    For this reason I am completely commenting out this test until the
    harness can be fixed. I believe the impact to couchdb is minimal.
    
    (It also suggests we may want to rethink how requests for os processes
    are queued and issued at some point in the future; this approach seems
    sub-optimal, especially if strict FIFO ordering is an expectation of the
    system.)
    
    /cc @eiri @rnewson @janl

----


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

Reply via email to