You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by iilyak <gi...@git.apache.org> on 2015/02/10 20:50:19 UTC

[GitHub] couchdb-couch pull request: 2547 fix broken tests

GitHub user iilyak opened a pull request:

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

    2547 fix broken tests

    

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

    $ git pull https://github.com/iilyak/couchdb-couch 2547-fix-broken-tests

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

    https://github.com/apache/couchdb-couch/pull/35.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 #35
    
----
commit b510c2187c126681b81ff4d5fff33d3f2d33f5a0
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T15:23:23Z

    Return context from test_util:start_couch
    
    We are going to return some context from start_couch so we pass it
    around
    
    COUCHDB-2547

commit 9af979fea817d27c53dc7200469889b27ab7cf7d
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T16:26:00Z

    Return started from test_util:start_applications
    
    COUCHDB-2547

commit 4529e1288a9d72637b0bcf19fe84cb39b646d37c
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T16:28:17Z

    Remove test_util:request
    
    Use test_request:request instead
    
    COUCHDB-2547

commit cacca040a28668e69829c21f3e2279a2f00c1f04
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T16:32:39Z

    Implement test_util:stop_sync
    
    COUCHDB-2547

commit f66255f83975128c6fdf33e043e2418772165c36
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T16:46:27Z

    Use test_util:stop_sync in test_util:stop_config
    
    COUCHDB-2547

commit fa159b1d484a43044bd3205f419a2f18a13ad875
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T16:47:23Z

    Implement test_util:stop_sync_throw
    
    COUCHDB-2547

commit cd6aed00d5ec09e98de703e8586571d3b05fbed5
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T18:17:56Z

    Use test_util:stop_sync_throw in test suite
    
    COUCHDB-2547

commit bc1963fa0337843aa45832f76a9c5dafdbd4d05c
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T18:19:36Z

    Use shutdown reason instead of normal for exit/2
    
    COUCHDB-2547

commit a60b88ff9d5b58597bf0a21382d51bda5d0ade5d
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T18:24:33Z

    Implement with_process_restart and wait_process
    
    Implement additional helper functions for test suite to follow DRY.
    
    COUCHDB-2547

commit 93d48aa8f640252b92c0eef0975893833a734bd0
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T18:33:38Z

    Use test_util:with_process_restart in test suite
    
    COUCHDB-2547

commit f568893721deeb94956ec1e75a24e5cf1b4fe358
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T18:40:51Z

    Use test_util:stop_config in test suite
    
    COUCHDB-2547

commit b5d8e09e725e4480e0ccd073eec7a7161d4adcc6
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T18:51:29Z

    Replace s/ejson:/jiffy:/g
    
    COUCHDB-2547

commit 74f539a3cfd6f35f40aedc84b701ec5caaf3d749
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-10T18:45:42Z

    Implement test_util:stop_applications/1
    
    COUCHDB-2547

commit 9e76a39369fcd1405d7f4b3b0da025a08cb5b2e0
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T21:38:40Z

    Add test_util:start/stop for minimal setup
    
    The idea is to use test_util:start to setup minimal environment which
    starts or mocks necessary dependencies. test_util:start returns
    `#test_context{}` to be passed to test_util:stop/1.
    
    COUCHDB-2547

commit 72c313daea250998d577821e36f6f003761d00a1
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-01-27T21:43:01Z

    Use test_util:start in couch_file_tests
    
    COUCHDB-2547

commit a78267ba9f844197159491e844921c5a1c23b15e
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T14:50:20Z

    Return #test_context{} from test_util:start_couch
    
    COUCHDB-2547

commit 061c5304f4aac97a56faf89d1dd21d003dea3572
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T14:57:44Z

    Use test_util:start in test suite
    
    Use test_util:start in setup fixture of tests.
    We also add ioq to list of dependencies for some tests.
    
    COUCHDB-2547

commit 7d4986008bd7c7e81cb91c33ed5a41f7eb98d21b
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T15:00:30Z

    Remove obsolete modules_loaded_tests
    
    COUCHDB-2547

commit 70049c443098d2f747c6fd5b218092f4eda9a65e
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T19:48:39Z

    Handle couch_auth_terminate gracefully
    
    In the case when `authentication_db` is changed we will get DOWN message
    with the Ref we already forgot. So we keep a list of monitors which we
    close but didn't receive DOWN message.
    
    COUCHDB-2547

commit 72981ec1be9d6fb5201cc7e8b87d9292219c5fb7
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T19:53:26Z

    Enable test suite for couch_auth_cache
    
    COUCHDB-2547

commit 533105688d199bdac372fac516ba40ff6446015a
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T19:58:52Z

    Add test should_close_old_db_on_auth_db_change
    
    COUCHDB-2547

commit b59b529e59c072939d2c327f86401ad2d30a5e98
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-02T20:24:59Z

    Enable couch_doc_json_tests
    
    COUCHDB-2547

commit 9985c2c9dc3635d215b3193743b1c64e9f56ae86
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T15:06:13Z

    Enable couch_key_tree_tests
    
    COUCHDB-2547

commit c2d3d4571b38ddb7499681d694ae5f03f69417f7
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T15:08:24Z

    Enable couch_uuid_tests
    
    COUCHDB-2547

commit 5e95b1a4cafd8e807467b5a1ce8947c5e79352ff
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T17:39:53Z

    Enable couchdb_attachments_tests
    
    COUCHDB-2547

commit 0d5acb1354c717a3b1350ca511d03e7817f48586
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T20:22:25Z

    Add test_util:wait function
    
    COUCHDB-2547

commit c51247d6519eff35b429ebc7a25183c0aa8801f6
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T20:23:36Z

    Enable couchdb_file_compression_tests
    
    COUCHDB-2547

commit 0b3e8966a41399eefc78858a714a69e45ccf722e
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T20:24:22Z

    Define metric [couchdb, httpd_status_codes, 406]
    
    COUCHDB-2547

commit d4d726cce4d909cee8f00985a7ddfff33627be35
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-03T21:14:20Z

    Enable couchdb_compaction_daemon test suite
    
    COUCHDB-2547

commit 9589b63bfbcba8e16d34bc900949a55ec16f0c62
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-04T16:41:21Z

    Enable couchdb_os_daemons_tests
    
    COUCHDB-2547

----


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75111300
  
    @iilyak but `{timeout, ?TIMEOUT_S` instructs to wait for 30 seconds, right? Or so it should...


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/35#discussion_r24919304
  
    --- Diff: src/test_util.erl ---
    @@ -86,43 +67,46 @@ start_couch(ExtraApps) ->
         start_couch(?CONFIG_CHAIN, ExtraApps).
     
     start_couch(IniFiles, ExtraApps) ->
    +    load_applications_with_stats(),
         ok = application:set_env(config, ini_files, IniFiles),
         ok = lager:start(),
    -    ok = start_applications([inets, ibrowse, ssl, config, couch] ++ ExtraApps),
    -    couch_stats:reload(),
    -    ok.
     
    +    Apps = start_applications(
    +        [inets, ibrowse, ssl, config, couch_event, couch]
    +        ++ ExtraApps),
    +
    +    #test_context{started = Apps}.
     
     stop_couch() ->
    -    ok = application:stop(couch),
    -    ok = application:stop(lager),
    -    ok = application:stop(goldrush),
    -    ok = application:stop(config),
    -    ok = application:stop(ssl),
    -    ok = application:stop(ibrowse),
    -    ok = application:stop(inets),
    +    ok = stop_applications([inets, ibrowse, ssl, config, goldrush, lager, couch]),
         ok.
     
    -
    +stop_couch(#test_context{started = Apps}) ->
    +    stop_applications(Apps);
     stop_couch(_) ->
         stop_couch().
     
    +start_applications(Apps) ->
    +    start_applications(Apps, []).
     
    -start_applications([]) ->
    -    ok;
    -start_applications([App|Apps]) ->
    -    case application:start(App) of
    +start_applications([], Acc) ->
    +    lists:reverse(Acc);
    +start_applications([App|Apps], Acc) ->
    +    NewAcc =
    --- End diff --
    
    `couch/src/test_util.erl:95: Warning: variable 'NewAcc' is unused`


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75164960
  
    Ok, finally got the situation when test had passed. 60 seconds is more than enough - approximately it needs ~40-50 seconds for all the things.
    
    However, two notices:
    
    1. It doesn't exits gracefully:
    
    ```
    02:53:15.709 [error] CRASH REPORT Process <0.1400.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.711 [error] CRASH REPORT Process <0.1399.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.711 [error] gen_server <0.1419.0> terminated with reason: killed
    02:53:15.712 [error] CRASH REPORT Process <0.1419.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.712 [error] gen_server <0.1418.0> terminated with reason: killed
    02:53:15.712 [error] gen_server <0.1417.0> terminated with reason: killed
    02:53:15.714 [error] CRASH REPORT Process <0.1418.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.714 [error] gen_server <0.1411.0> terminated with reason: killed
    02:53:15.715 [error] CRASH REPORT Process <0.1417.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.716 [error] CRASH REPORT Process <0.1411.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.716 [error] gen_server <0.1410.0> terminated with reason: killed
    02:53:15.716 [error] gen_server <0.1389.0> terminated with reason: killed
    02:53:15.716 [error] gen_server <0.1388.0> terminated with reason: killed
    02:53:15.717 [error] CRASH REPORT Process <0.1389.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.718 [error] CRASH REPORT Process <0.1410.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.718 [error] gen_server <0.1438.0> terminated with reason: killed
    02:53:15.719 [error] CRASH REPORT Process <0.1388.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    02:53:15.719 [error] gen_server <0.1437.0> terminated with reason: killed
    02:53:15.720 [error] CRASH REPORT Process <0.1438.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 804
    ```
    
    2. Why it have to run for so long? Previously 30 seconds was more than enough to done all the things on slow and constraint with resources virtual box. Here I cannot fit the limit with my real notebook /:


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-74906164
  
    `couch/test/couch_task_status_tests.erl:96: Warning: function should_control_update_frequency/1 is unused` - it's actually commended in test suite.


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-74906966
  
    Looks like missed in previous changes:
    `couch/test/couch_stream_tests.erl:113: Warning: a term is constructed, but never used` - those assertions remain uncovered.


---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75108298
  
    I agree the noise level is horrible. I would love to see only `<test>...ok` by default and also have `-v` or something. So the one can enable logs for debugging failing test cases. But it is not easy with eunit. 


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/35#discussion_r24919394
  
    --- Diff: src/couch_auth_cache.erl ---
    @@ -231,8 +232,18 @@ handle_info(restart_event_listener, State) ->
                 ?MODULE, handle_db_event, nil, [{dbname, AuthDbName}]
             ),
         {noreply, State#state{event_listener=NewListener}};
    +handle_info({'DOWN', Ref, _, _, shutdown}, State) ->
    --- End diff --
    
    `couch/src/couch_auth_cache.erl:235: Warning: variable 'Ref' is unused`


---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-74972517
  
    Test `should_control_update_frequency` is commented out because the functionality it tests is disabled https://github.com/apache/couchdb-couch/commit/5d1334028123ae3002a1c7c8d62de8da021bc3cd


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-77274124
  
    `not_purged` [means|http://www.erlang.org/doc/man/erlang.html#load_module-2]:
    > Binary contains a module which cannot be loaded because old code for this module already exists.
    
    Run make clean to drop old beam files.



---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75110713
  
    Thank you @kxepal for pointing out to timeout. Here is what happens:
    - [default timeout is 5 sec](https://github.com/erlang/otp/blob/maint/lib/eunit/src/eunit_internal.hrl#L12) 
    - [we wait at least 6 sec](https://github.com/iilyak/couchdb-couch/blob/2547-fix-broken-tests/test/couchdb_compaction_daemon.erl#L77-L81)


---
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: 2547 fix broken tests

Posted by sebastianrothbucher <gi...@git.apache.org>.
Github user sebastianrothbucher commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-87475344
  
    looks good to me also - just a little catch for the javascript tests: they require /_utils/script/test/lorem(_b64).txt in place and fail if the files are not there (at least one: attachments.js). Quick remedy is copying the files obviously, but that's not good. Anyone else having the same?


---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75119391
  
    @kxepal Yes you are right `{timeout, ?TIMEOUT_S` works as expected. Could you try increasing the value of `TIMEOUT_S` to 60 sec? If it would work I'll push the update to the PR. 


---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75100001
  
    Hmm, I cannot reproduce this https://gist.github.com/kxepal/7ed999211a24f2744c52


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75109030
  
    @iilyak well, that's how eunit worked for in 1963-eunit branch on apache/couchdb repo. We just need to disable sasl and backport lager control code from rcouch.


---
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: 2547 fix broken tests

Posted by sebastianrothbucher <gi...@git.apache.org>.
Github user sebastianrothbucher commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-88635468
  
    @iilyak sorry, just realized it's different projects - did a PR there. eunit looks good as far as I can tell... - great!


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75105960
  
    Oh, there timeout happened. It's hard to notice the real problem in this logging spam /:


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-74905795
  
    Compaction tests doesn't feels well:
    https://gist.github.com/kxepal/7ed999211a24f2744c52


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/35#discussion_r24920217
  
    --- Diff: test/couch_changes_tests.erl ---
    @@ -38,13 +35,18 @@ setup() ->
             save_doc(Db, {[{<<"_id">>, <<"doc5">>}]})
         ]],
         Rev = lists:nth(3, Revs),
    -    {ok, Rev1} = save_doc(Db, {[{<<"_id">>, <<"doc3">>}, {<<"_rev">>, Rev}]}),
    +    couch_db:ensure_full_commit(Db),
    +    {ok, Db1} = couch_db:reopen(Db),
    +
    +    Doc = couch_db:open_doc(Db1, <<"doc3">>),
    --- End diff --
    
    `couch/test/couch_changes_tests.erl:41: Warning: variable 'Doc' is unused`


---
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: 2547 fix broken tests

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-77281304
  
    oh ok!
    
    now i get:
    
    ```
    module 'couch_work_queue'
      module 'couch_work_queue_tests'
        Single producer and consumer
          Queue with 3 max items
            couch_work_queue_tests:143: should_have_no_items_for_new_queue...ok
            undefined
            *** instantiation of subtests failed ***
    **in function couch_work_queue_tests:'-should_block_producer_on_full_queue_count/1-fun-1-'/2 (test/couch_work_queue_tests.erl, line 206)
    in call from couch_work_queue_tests:should_block_producer_on_full_queue_count/1 (test/couch_work_queue_tests.erl, line 206)
    **error:{assertEqual_failed,[{module,couch_work_queue_tests},
                         {line,206},
                         {expression,"couch_work_queue : item_count ( Q )"},
                         {expected,2},
                         {value,1}]}
    ```


---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-77648648
  
    @robertkowalski Could you test it again? I pushed the fix.


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75122811
  
    @iilyak cannot check since it starts fails for me with enoent error as previous report was. But I got the reason:
    ```
    20:28:29.004 [error] gen_server couch_compaction_daemon terminated with reason: {compaction_loop_died,{{badmatch,{error,enoent}},[{couch_compaction_daemon,abs_path,1},{couch_compaction_daemon,free_space_rec,2},{couch_compaction_daemon,can_db_compact,2},{couch_compaction_daemon,maybe_compact_db,2},{couch_compaction_daemon,'-compact_loop/1-fun-0-',2},{couch_server,'-all_databases/2-fun-0-',4},{filelib,do_fold_files2,8},{couch_server,all_databases,2}]}}
    ```


---
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: 2547 fix broken tests

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-77273177
  
    My system: OSX with Erlang/OTP 17.4 
    
    ```
    module 'couchdb_modules_load_tests'
      Verify that all modules loads
        couchdb_modules_load_tests:62: should_load_module (couch_auth_cache)...[0.002 s] ok
        couchdb_modules_load_tests:62: should_load_module (couch_btree)...[0.003 s] ok
        couchdb_modules_load_tests:62: should_load_module (couch_changes)...[0.003 s] ok
        couchdb_modules_load_tests:62: should_load_module (couch_compress)...[0.002 s] ok
        couchdb_modules_load_tests:62: should_load_module (config)...*failed*
    in function couchdb_modules_load_tests:'-should_load_module/1-fun-0-'/1 (test/couchdb_modules_load_tests.erl, line 62)
    **error:{assertMatch_failed,[{module,couchdb_modules_load_tests},
                         {line,62},
                         {expression,"code : load_file ( Mod )"},
                         {pattern,"{ module , _ }"},
                         {value,{error,not_purged}}]}
    00:22:10.137 [error] Loading of /Users/robert/apache/couchdb/src/config/ebin/config.beam failed: not_purged
    
    
        couchdb_modules_load_tests:62: should_load_module (config_writer)...[0.009 s] ok
    ```


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/35#discussion_r24920915
  
    --- Diff: include/couch_eunit.hrl ---
    @@ -31,6 +31,11 @@
         filename:join([?BUILDDIR(), "src", "couch", "test", "fixtures"])).
     -define(TEMPDIR,
         filename:join([?BUILDDIR(), "tmp", "tmp_data"])).
    +-define(ABS_PATH(File),
    +    filename:join([
    +        filename:dirname(
    +            filename:dirname(
    +                filename:dirname(filename:absname(File)))), File])).
    --- End diff --
    
    I lost myself here counting what the actual path here will be. Is there way to make it better?


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-89686473
  
    @iilyak thank you a lot!


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-75105258
  
    It seems some race condition happened for those run. Stripping any other tests and run only compaction one gives me constantly "one test canceled" and failure in the result.
    
    https://gist.github.com/kxepal/40f5a6dd4ad13af000ac


---
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: 2547 fix broken tests

Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/35#discussion_r24927505
  
    --- Diff: include/couch_eunit.hrl ---
    @@ -31,6 +31,11 @@
         filename:join([?BUILDDIR(), "src", "couch", "test", "fixtures"])).
     -define(TEMPDIR,
         filename:join([?BUILDDIR(), "tmp", "tmp_data"])).
    +-define(ABS_PATH(File),
    +    filename:join([
    +        filename:dirname(
    +            filename:dirname(
    +                filename:dirname(filename:absname(File)))), File])).
    --- End diff --
    
    couch/test/couch_stream_tests.erl:113: 
    Is a strange one


---
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: 2547 fix broken tests

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

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-87673869
  
    @sebastianrothbucher I didn't work on JS test suite in the PR. I've got an impression that someone else is working on this.   


---
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: 2547 fix broken tests

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/35#issuecomment-77708269
  
    @iilyak works now! thanks!


---
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: 2547 fix broken tests

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/35#discussion_r24919241
  
    --- Diff: src/couch_proc_manager.erl ---
    @@ -449,13 +449,23 @@ return_proc(#state{} = State, #proc_int{} = ProcInt) ->
                     true = ets:update_element(?PROCS, Pid, [
                         {#proc_int.client, undefined}
                     ]),
    -                State
    +                maybe_assign_proc(State, ProcInt)
             end;
         false ->
             remove_proc(State, ProcInt)
         end,
         flush_waiters(NewState, Lang).
     
    +maybe_assign_proc(#state{} = State, ProcInt) ->
    +    #proc_int{pid = Pid, lang = Lang} = ProcInt,
    --- End diff --
    
    `couch/src/couch_proc_manager.erl:460: Warning: variable 'Pid' is unused`


---
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: 2547 fix broken tests

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

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


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