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

Functional tests: stabilizing results and a few test fixes. #63

Closed
wants to merge 15 commits into from
Closed

Functional tests: stabilizing results and a few test fixes. #63

wants to merge 15 commits into from

Conversation

gitcoindev
Copy link
Contributor

@gitcoindev gitcoindev commented Nov 16, 2021

Description

Hi, I noticed the Bitgesell contribution program at https://gitcoin.co/issue/bitgesellofficial/bitgesell/62/100027021 also referenced at #62 and decided to help a bit on this.

Notes

Currently after the changes, the test complete in a reasonable time and that the results are reproducible.

Approach taken: I roughly compared latest bitcoin and Bitgesell forks, then had a deeper dive into the test framework and compared against the btc, then ran the BTC and BGL full test suite a few times and started identifying the root cause of the BGL failures.

I already found and fixed a couple of issues with the functional tests. The major fix was stabilizing the RPC connection failures by waiting for the outgoing node to initialize, apart from that I saw a few tests that used BTC addresses and a few pre-segwit that could be partially or fully disabled.

The remaining 40 functional tests I will investigate and try to fix one by one, with the goal to reducing failures close to zero.

Korrrba added 12 commits November 16, 2021 15:56
Sync with bitcoin test framework, stabilize network connection by
waiting for the outgoing node before test starts.

Add disable_autoconnect to disable ThreadOpenConnections.

Add block generator functions as in the bitcoin test framework.

Ref: https://gitcoin.co/issue/bitgesellofficial/bitgesell/62/100027021
asyncio.WindowsSelectorEventLoopPolicy for Windows and send additional
msg during p2p connection.

Ref: https://gitcoin.co/issue/bitgesellofficial/bitgesell/62/100027021
The test failed due to missing config of the base class, initialize the
base class config.

Ref: https://gitcoin.co/issue/bitgesellofficial/bitgesell/62/100027021
The test failed due to using bitcoin address list, correct this by using
BGL addresses.

Ref: https://gitcoin.co/issue/bitgesellofficial/bitgesell/62/100027021
The test failed due to expecting the initial BGL balance to 1250,
insert correct inital 5000 BGL balance.

Ref: https://gitcoin.co/issue/bitgesellofficial/bitgesell/62/100027021
@gitcoindev
Copy link
Contributor Author

Hi. I noticed some fixes start to overlap with #49, to avoid double work I opened three additional issues, two look like a potential bug, one is a test issue, and I am moving the PR from WIP to 'Ready for review state'.

@gitcoindev gitcoindev changed the title [WIP] functional-tests-fixes Functional tests: stabilizing results and a few test fixes. Nov 17, 2021
@gitcoindev
Copy link
Contributor Author

Hi @janus I am not sure if you are the maintainer of the BGL codebase, I have seen your recent commits to master.
I would be grateful if you or @wu-emma confirmed who is in charge and would have time to review my PR. I would be fine if you suggest a rework or reject it if this is a complete no-go ;) I tried Discord but it is pretty inactive and I am not sure what is the status of the project. Cheers!

@janus
Copy link
Collaborator

janus commented Nov 18, 2021

Hi @janus I am not sure if you are the maintainer of the BGL codebase, I have seen your recent commits to master. I would be grateful if you or @wu-emma confirmed who is in charge and would have time to review my PR. I would be fine if you suggest a rework or reject it if this is a complete no-go ;) I tried Discord but it is pretty inactive and I am not sure what is the status of the project. Cheers!

Thanks. Give me few days.

@gitcoindev
Copy link
Contributor Author

Hi @janus I am not sure if you are the maintainer of the BGL codebase, I have seen your recent commits to master. I would be grateful if you or @wu-emma confirmed who is in charge and would have time to review my PR. I would be fine if you suggest a rework or reject it if this is a complete no-go ;) I tried Discord but it is pretty inactive and I am not sure what is the status of the project. Cheers!

Thanks. Give me few days.

Thank you, take your time on this.

pass

def generate(self, generator, *args, sync_fun=None, **kwargs):
blocks = generator.generate(*args, invalid_call=False, **kwargs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You wrote a lot of new functions. That's a bit unusual.

@janus
Copy link
Collaborator

janus commented Nov 24, 2021

@gitcoindev It would be great if you could add more commits.

@gitcoindev
Copy link
Contributor Author

@gitcoindev It would be great if you could add more commits.

Hi @janus thank you for the feedback, I will split the change that you mentioned into several commits.

@gitcoindev
Copy link
Contributor Author

Hi @janus I am back, was struck with world's favorite virus, still not perfect but managed to survive. Anyways I like to finish what I started, I had a look at your sync branches, and will likely try to fix functional tests in small batches directing your latest sync branch, perhaps 2-3 tests at a time so that you can review it easily. I hope I can help a bit and use this as a brain puzzle exercise to get me back on track. I am not sure perhaps I will close this PR and move on as it is out of sync now.

@gitcoindev gitcoindev closed this Dec 20, 2021
@janus
Copy link
Collaborator

janus commented Dec 21, 2021

Hi @janus I am back, was struck with world's favorite virus, still not perfect but managed to survive. Anyways I like to finish what I started, I had a look at your sync branches, and will likely try to fix functional tests in small batches directing your latest sync branch, perhaps 2-3 tests at a time so that you can review it easily. I hope I can help a bit and use this as a brain puzzle exercise to get me back on track. I am not sure perhaps I will close this PR and move on as it is out of sync now.

Great news. I wish you the very best.

@ayushkumar63123
Copy link

ayushkumar63123 commented Dec 21, 2021 via email

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.

None yet

3 participants