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

RPC tests: Fix while loops of cfund tests causing random test fails #418

Merged
merged 1 commit into from
Feb 24, 2019

Conversation

marcus290
Copy link
Contributor

@marcus290 marcus290 commented Feb 11, 2019

The while loops in these tests are designed to wait until a proposal is expired. However previously, these two tests would fail randomly at the assert immediately following the while loop.

time.time() returns values inconsistent with the block times of the test blockchain, recorded in nTime of each block, sometimes by up to 100s.

The purpose of the test is not to compare time.time() but to test whether a block with nTime exceeding a proposal's deadline will be correctly marked as expired. Hence the while loop has been revised to reflect this.

The running time of these tests is also reduced.

Fixes two tests in #416.

@marcus290 marcus290 merged commit 66a4852 into navcoin:master Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants