You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2019/08/07 05:55:58 UTC
[couchdb] branch jenkins-fix-cpse-repl-purge-test created (now
d3a70da)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch jenkins-fix-cpse-repl-purge-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
at d3a70da Fix cpse_test_purge_replication eunit test
This branch includes the following new commits:
new d3a70da Fix cpse_test_purge_replication eunit test
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb] 01/01: Fix cpse_test_purge_replication eunit test
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch jenkins-fix-cpse-repl-purge-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit d3a70dabad7033baa6177d03650c80417ad26ac1
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Wed Aug 7 01:52:47 2019 -0400
Fix cpse_test_purge_replication eunit test
It doesn't work on Jenkins but worked locally.
Noticed that we started chttpd even though the clustered port was never used.
Add a wait function in `db_url/1` to make sure to wait until the db is
available via the HTTP interface before continuing.
---
src/couch_pse_tests/src/cpse_test_purge_replication.erl | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/couch_pse_tests/src/cpse_test_purge_replication.erl b/src/couch_pse_tests/src/cpse_test_purge_replication.erl
index 4a08225..20dcc2f 100644
--- a/src/couch_pse_tests/src/cpse_test_purge_replication.erl
+++ b/src/couch_pse_tests/src/cpse_test_purge_replication.erl
@@ -21,7 +21,7 @@
setup_all() ->
- cpse_util:setup_all([mem3, fabric, chttpd, couch_replicator]).
+ cpse_util:setup_all([mem3, fabric, couch_replicator]).
setup_each() ->
@@ -205,4 +205,11 @@ make_shard(DbName) ->
db_url(DbName) ->
Addr = config:get("httpd", "bind_address", "127.0.0.1"),
Port = mochiweb_socket_server:get(couch_httpd, port),
- ?l2b(io_lib:format("http://~s:~b/~s", [Addr, Port, DbName])).
+ Url = ?l2b(io_lib:format("http://~s:~b/~s", [Addr, Port, DbName])),
+ test_util:wait(fun() ->
+ case test_request:get(?b2l(Url)) of
+ {ok, 200, _, _} -> ok;
+ _ -> wait
+ end
+ end),
+ Url.