Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whait db close a little bit before failing test #533

Merged
merged 1 commit into from
May 19, 2017

Conversation

iilyak
Copy link
Contributor

@iilyak iilyak commented May 19, 2017

Overview

Databases are closed asynchronously. However it was not accounted for in
the test case. This commit waits database to close before it makes a
decision to abort the test. It uses default timeout of 5 sec.
I.e. if test case detects that database is still opened after 5 sec
it considers it as failure.

Testing recommendations

make eunit apps=couch_index tests=compaction_test

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@eiri
Copy link
Member

eiri commented May 19, 2017

Looks good to me, didn't know we have test_util:wait/1,2,3 function. Except maybe pass timeout explicitly? " 'wait' for how long?" was my first question when I've seen the change.

@iilyak
Copy link
Contributor Author

iilyak commented May 19, 2017

@eiri: What timeout value would you recommend? I am considering 500.

Databases are closed asynchronously. However it was not accounted for in
the test case. This commit waits database to close before it makes a
decission to abort the test.
I.e. if test case detects that database is still opened after 1 second
it considers it as failure.
@eiri
Copy link
Member

eiri commented May 19, 2017

@iilyak hard to guess, to be honest, 500 or 1000 both look good for me. test_util's wait default is 5000, but it's more fitting for the tests around os_process related modules, it's common default there.

Copy link
Member

@eiri eiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@iilyak iilyak merged commit cc12e8c into apache:master May 19, 2017
@iilyak
Copy link
Contributor Author

iilyak commented May 19, 2017

@wohali: Sorry for the delay.

@iilyak iilyak deleted the wait_db_close_in_test branch May 19, 2017 18:29
@wohali
Copy link
Member

wohali commented May 19, 2017

@iilyak Hey I'm just glad people are starting to help ;)

nickva pushed a commit to nickva/couchdb that referenced this pull request Sep 7, 2022
Improvement to "3.1.2.2. Reduce and Rereduce Functions" argument description apache#517

Co-authored-by: Sunitha Rajaretnam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants