Hi Martin,

see my responses inline

On Sun, May 10, 2015 at 1:50 PM, Martin Lagrange
<lagrangemar...@gmail.com> wrote:
> Hi everyone,
>
> I am currently working on solving an issue in the rewriting module that
> affect the rewrite process :
> https://github.com/apache/couchdb-chttpd/blob/master/src/chttpd_rewrite.erl
> and I have written some end-to-end regression tests :
> https://github.com/apache/couchdb/blob/master/test/javascript/tests/rewrite.js

Wow cool!

> I modify the locally cloned couchdb-chttpd repository and compile the
> program again, then run the server and the tests again.
>
> make && dev/run --with-admin-party-please
>> test/javascript/run test/javascript/tests/rewrite.js
>
>
> The thing is that I would like in someway to see what happen in the program
> during the execution, especially when this tests are running.
>
> I have written :
>
> io:format('blabla'),
>
>
> or
>
> couch_log:debug("blabla"),
>
>
>  in the erlang file but nothing seems to appear whether in the server
> console or in any logs.
>


couchjs [1] runs against the old so-called backdoorports [2], which
are served by apache/couchdb-couch. The cluster interface with the new
"public" ports for the cluster are served by "couchdb-chttpd" - the
part where you want t log.

This means the JavaScript testsuite does not use code located in chttpd.

There are some integration tests for chttpd in Erlang [3] - one idea
for the future is to run the JS tests also against the cluster but it
will need some further modifications of the  JS testsuite.


[1] https://github.com/apache/couchdb/blob/master/test/javascript/run#L27
[2] 
https://github.com/apache/couchdb-couch/blob/master/priv/couch_js/http.c#L363
[3] https://github.com/apache/couchdb-chttpd/blob/master/test/chttpd_db_test.erl

Reply via email to