You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by nickva <gi...@git.apache.org> on 2015/10/12 16:11:39 UTC
[GitHub] couchdb-couch pull request: Increase EUnit views tests stability
GitHub user nickva opened a pull request:
https://github.com/apache/couchdb-couch/pull/118
Increase EUnit views tests stability
* Give couchdb_1283 tests more docs to process so compactor
stays running longer.
* In couchdb_1309, when waiting for view cleanup, test once,
if fails due to race condition, wait a second and try again.
COUCHDB-2848
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-couch 2848-stablize-eunit-tests
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch/pull/118.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 #118
----
commit fd47c1cf5247e158aa3c38a9cf88eb8bb4bd7d78
Author: Nick Vatamaniuc <va...@gmail.com>
Date: 2015-10-12T13:59:56Z
Increase EUnit test stability
* Give couchdb_1283 tests more docs to process so compactor
stays running longer.
* In couchdb_1309, when waiting for view cleanup, test once,
if fails due to race condition, wait a second and try again.
COUCHDB-2848
----
---
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: Increase EUnit views tests stability
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/118#discussion_r41762150
--- Diff: test/couchdb_views_tests.erl ---
@@ -286,7 +286,13 @@ couchdb_1309(DbName) ->
?assert(is_pid(NewIndexerPid)),
?assert(is_process_alive(NewIndexerPid)),
?assertNotEqual(IndexerPid, NewIndexerPid),
- ?assertEqual(2, count_users(DbName)),
+ UserCnt = case count_users(DbName) of
--- End diff --
(:
---
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: Increase EUnit views tests stability
Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:
https://github.com/apache/couchdb-couch/pull/118#discussion_r41761856
--- Diff: test/couchdb_views_tests.erl ---
@@ -286,7 +286,13 @@ couchdb_1309(DbName) ->
?assert(is_pid(NewIndexerPid)),
?assert(is_process_alive(NewIndexerPid)),
?assertNotEqual(IndexerPid, NewIndexerPid),
- ?assertEqual(2, count_users(DbName)),
+ UserCnt = case count_users(DbName) of
--- End diff --
so I suggest pulling this retry out into a function with a countdown parameter, as long as its finite retry we should fix both issues.
---
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: Increase EUnit views tests stability
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147494269
During testing your patch found something new:
```
couchdb_views_tests:228: couchdb_1138...22:07:43.894 [info] Opening index for db: eunit-test-db-1444676863676978 idx: _design/foo sig: "5398c9ad12cad56d2228cc89a2770ddf"
22:07:43.897 [info] Starting index update for db: eunit-test-db-1444676863676978 idx: _design/foo
22:07:43.993 [info] Index update finished for db: eunit-test-db-1444676863676978 idx: _design/foo
22:07:43.994 [notice] 127.0.0.1 - - GET /eunit-test-db-1444676863676978/_design/foo/_view/bar 200
22:07:44.182 [info] Starting index update for db: eunit-test-db-1444676863676978 idx: _design/foo
22:07:44.188 [info] Index update finished for db: eunit-test-db-1444676863676978 idx: _design/foo
22:07:44.189 [notice] 127.0.0.1 - - GET /eunit-test-db-1444676863676978/_design/foo/_view/bar 200
22:07:44.190 [info] Starting compaction for db "eunit-test-db-1444676863676978"
*failed*
in function couchdb_views_tests:wait_db_compact_done/2 (test/couchdb_views_tests.erl, line 559)
in call from couchdb_views_tests:'-couchdb_1138/1-fun-15-'/1 (test/couchdb_views_tests.erl, line 249)
**error:{assertion_failed,[{module,couchdb_views_tests},
{line,561},
{reason,"DB compaction failed to finish"}]}
output:<<"">>
```
But issue with 1283 test still happens for me with quite few iterations:
```
couchdb_views_tests:315: couchdb_1283...22:07:47.525 [notice] config: [couchdb] max_dbs_open set to 3 for reason nil
22:07:47.526 [notice] config: [couchdb] delayed_commits set to false for reason nil
22:07:48.812 [info] Opening index for db: eunit-test-db-1444676867526228 idx: _design/foo sig: "0963a19eb3ef007218f1e11f0aefa2d9"
22:07:48.812 [info] Starting index update for db: eunit-test-db-1444676867526228 idx: _design/foo
22:07:49.313 [info] Index update finished for db: eunit-test-db-1444676867526228 idx: _design/foo
22:07:49.314 [notice] 127.0.0.1 - - GET /eunit-test-db-1444676867526228/_design/foo/_view/foo 200
22:07:49.810 [info] Index shutdown by monitor notice for db: eunit-test-db-1444676867526228 idx: _design/foo
22:07:49.811 [info] Closing index for db: eunit-test-db-1444676867526228 idx: _design/foo sig: "0963a19eb3ef007218f1e11f0aefa2d9"
reason: normal
22:07:50.012 [info] Opening index for db: eunit-test-db-1444676867526228 idx: _design/foo sig: "0963a19eb3ef007218f1e11f0aefa2d9"
22:07:50.013 [info] Compaction started for db: eunit-test-db-1444676867526228 idx: _design/foo
22:07:50.015 [info] Index shutdown by monitor notice for db: eunit-test-db-1444676867526228 idx: _design/foo
*failed*
in function couchdb_views_tests:'-couchdb_1283/0-fun-9-'/2 (test/couchdb_views_tests.erl, line 367)
in call from couchdb_views_tests:'-couchdb_1283/0-fun-22-'/0 (test/couchdb_views_tests.erl, line 367)
**error:{assertEqual,[{module,couchdb_views_tests},
{line,367},
{expression,"get_writer_status ( Writer3 )"},
{expected,{error,all_dbs_active}},
{value,ok}]}
output:<<"">>
```
---
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: Increase EUnit views tests stability
Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:
https://github.com/apache/couchdb-couch/pull/118#discussion_r41762263
--- Diff: test/couchdb_views_tests.erl ---
@@ -286,7 +286,13 @@ couchdb_1309(DbName) ->
?assert(is_pid(NewIndexerPid)),
?assert(is_process_alive(NewIndexerPid)),
?assertNotEqual(IndexerPid, NewIndexerPid),
- ?assertEqual(2, count_users(DbName)),
+ UserCnt = case count_users(DbName) of
--- End diff --
it's just one retry, after a 1s delay. +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: Increase EUnit views tests stability
Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147414498
+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: Increase EUnit views tests stability
Posted by nickva <gi...@git.apache.org>.
Github user nickva commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147534760
3 more green tests here https://travis-ci.org/nickva/couchdb-couch/builds/85009608
---
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: Increase EUnit views tests stability
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/118#discussion_r41762111
--- Diff: test/couchdb_views_tests.erl ---
@@ -286,7 +286,13 @@ couchdb_1309(DbName) ->
?assert(is_pid(NewIndexerPid)),
?assert(is_process_alive(NewIndexerPid)),
?assertNotEqual(IndexerPid, NewIndexerPid),
- ?assertEqual(2, count_users(DbName)),
+ UserCnt = case count_users(DbName) of
--- End diff --
I think it's a good candidate for some ?RETRY N times macro. Which will be useful not only here.
---
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: Increase EUnit views tests stability
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/couchdb-couch/pull/118
---
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: Increase EUnit views tests stability
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/118#discussion_r41805699
--- Diff: test/couchdb_views_tests.erl ---
@@ -286,7 +286,13 @@ couchdb_1309(DbName) ->
?assert(is_pid(NewIndexerPid)),
?assert(is_process_alive(NewIndexerPid)),
?assertNotEqual(IndexerPid, NewIndexerPid),
- ?assertEqual(2, count_users(DbName)),
+ UserCnt = case count_users(DbName) of
+ N when N > 2 ->
+ time:sleep(1000),
+ count_users(DbName);
--- End diff --
Need to replace tabs with spaces in this block.
---
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: Increase EUnit views tests stability
Posted by nickva <gi...@git.apache.org>.
Github user nickva commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147493539
Here is travis results from PR on my own repo:
https://travis-ci.org/nickva/couchdb-couch/builds/84977585
---
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: Increase EUnit views tests stability
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147814646
+1 for the updated version, travis seems unable to fetch erlang release to run the build (not our failure). So far, long run the tests in loop shows that issue is actually fixed.
---
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: Increase EUnit views tests stability
Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:
https://github.com/apache/couchdb-couch/pull/118#discussion_r41761731
--- Diff: test/couchdb_views_tests.erl ---
@@ -286,7 +286,13 @@ couchdb_1309(DbName) ->
?assert(is_pid(NewIndexerPid)),
?assert(is_process_alive(NewIndexerPid)),
?assertNotEqual(IndexerPid, NewIndexerPid),
- ?assertEqual(2, count_users(DbName)),
+ UserCnt = case count_users(DbName) of
--- End diff --
fine for the positive case but it's an infinite loop if this never happens, and we'd rather the test failed eventually.
---
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: Increase EUnit views tests stability
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147534500
All green! +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: Increase EUnit views tests stability
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch/pull/118#issuecomment-147421763
Let's see what travis say. +1 if green. Though, we shouldn't make our tests slower to make them green.
---
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.
---