couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Lagrange <lagrangemar...@gmail.com>
Subject Re: How to get back to the screen some debug info from the compiled program ?
Date Sun, 10 May 2015 22:02:36 GMT
Hey, Robert, thanks for your reply !

Whaw, I knew that dev/run was running 3 clusters at :


   - http://127.0.0.1:25984/
   - http://127.0.0.1:35984/
   - http://127.0.0.1:15984/

but I didn't know that it was running another cluster at :

   - http://localhost:15986/

but I should have seen :
https://github.com/apache/couchdb/blob/master/dev/run#L419

Do you mean that the cluster 15986 is not served by the compiled app ? By
what ? What do you mean exactly by
"are served by apache/couchdb-couch." ?

There are some integration tests for chttpd in Erlang [3]


Yes, indeed but there are not so many and not as convenient as the
javascript tests :D


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

As a trivial approach, wouldn't it be enough to just say to couchJS command
to run itself against the dev cluster ?
There is this -u option to specify a uri file to run the test against.

https://github.com/apache/couchdb/blob/master/test/javascript/run#L74


Sorry in case I have misunderstood you.


2015-05-10 21:13 GMT+02:00 Robert Kowalski <rok@kowalski.gd>:

> Hi Martin,
>
> see my responses inline
>
> On Sun, May 10, 2015 at 1:50 PM, Martin Lagrange
> <lagrangemartin@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
>



-- 
Martin LAGRANGE

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message