You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2017/07/12 19:19:54 UTC

[couchdb] 02/02: Fix couchdb_os_proc_pool eunit timeouts

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch 631-fix-os-proc-pool-eunit
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 49f6873db9567107582ad6da523835ebfcc02010
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Wed Jul 12 13:56:08 2017 -0500

    Fix couchdb_os_proc_pool eunit timeouts
    
    There's a theory that the low memory limits on our CI instances are
    causing the tests spawning JS processes to fail. Given that we don't
    need them here we can trivially exclude that as a cause of the test
    failures.
    
    Fixes #631
---
 src/couch/test/couchdb_os_proc_pool.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/couch/test/couchdb_os_proc_pool.erl b/src/couch/test/couchdb_os_proc_pool.erl
index f14af68..65ae5c5 100644
--- a/src/couch/test/couchdb_os_proc_pool.erl
+++ b/src/couch/test/couchdb_os_proc_pool.erl
@@ -206,6 +206,8 @@ should_reduce_pool_on_idle_os_procs() ->
 
 
 setup_config() ->
+    MFA = "{couch_native_process, start_link, []}",
+    config:set("native_query_servers", "test_lang", MFA, false),
     config:set("query_server_config", "os_process_limit", "3", false),
     config:set("query_server_config", "os_process_soft_limit", "2", false),
     ok = confirm_config("os_process_soft_limit", "2").
@@ -233,7 +235,7 @@ spawn_client() ->
     Parent = self(),
     Ref = make_ref(),
     Pid = spawn(fun() ->
-        Proc = couch_query_servers:get_os_process(<<"javascript">>),
+        Proc = couch_query_servers:get_os_process(<<"test_lang">>),
         loop(Parent, Ref, Proc)
     end),
     {Pid, Ref}.
@@ -243,7 +245,7 @@ spawn_client(DDocId) ->
     Ref = make_ref(),
     Pid = spawn(fun() ->
         DDocKey = {DDocId, <<"1-abcdefgh">>},
-        DDoc = #doc{body={[]}},
+        DDoc = #doc{body={[{<<"language">>, <<"test_lang">>}]}},
         Proc = couch_query_servers:get_ddoc_process(DDoc, DDocKey),
         loop(Parent, Ref, Proc)
     end),

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.