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

Relay Publish: Extend coverage #2

Merged
merged 18 commits into from
Nov 17, 2023
Merged

Relay Publish: Extend coverage #2

merged 18 commits into from
Nov 17, 2023

Conversation

fbarbu15
Copy link
Collaborator

@fbarbu15 fbarbu15 commented Nov 7, 2023

Second iteration of the framework for interop/e2e tests:

  • finished relay publish coverage: 26 tests
  • extend waku node api with more actions
  • add common custom logger lib
  • add more reusable functions/steps for relay tests
  • improve setup/cleanup hooks
  • discovered multiple bugs in the process

@fbarbu15 fbarbu15 changed the title small improvements Relay Publish: Extend coverage Nov 13, 2023
@fbarbu15 fbarbu15 marked this pull request as ready for review November 16, 2023 07:41
@AlbertoSoutullo
Copy link
Collaborator

I really like this! Just a comment that may or may not be helpful. Unless you specifically want to use discv5, I also think it is a good idea to connect nodes manually. It is an admin API method, so you have to enable it with --rpc-admin=true.
I guess depending on the test case, this may be more handy than have to wait for the discovery protocol connections. Also, you get a bool with the success or failure of the connection, that you can use to keep going with the test or assert the error. Just a comment, of course.

Cool work!

@fbarbu15
Copy link
Collaborator Author

I really like this! Just a comment that may or may not be helpful. Unless you specifically want to use discv5, I also think it is a good idea to connect nodes manually. It is an admin API method, so you have to enable it with --rpc-admin=true. I guess depending on the test case, this may be more handy than have to wait for the discovery protocol connections. Also, you get a bool with the success or failure of the connection, that you can use to keep going with the test or assert the error. Just a comment, of course.

Cool work!

Thanks for the feedback and the suggestion.
If it speeds up tests then I need to try it.
We could have dedicated tests for this connection method or have it behind a feature flag and enable/disable it for the whole suite. Need to think how it makes more sense, I tend to go with the 1st approach and have a dedicated suite for the Admin API. Either way it needs some representation for sure!

Copy link

@AlejandroCabeza AlejandroCabeza left a comment

Choose a reason for hiding this comment

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

LGTM! Just added a few small suggestions/improvements that you can pay attention to if you feel like so 😄

src/env_vars.py Show resolved Hide resolved
src/libs/custom_logger.py Show resolved Hide resolved
src/node/api_clients/base_client.py Outdated Show resolved Hide resolved
src/node/waku_node.py Outdated Show resolved Hide resolved
src/node/waku_node.py Outdated Show resolved Hide resolved
src/steps/relay.py Outdated Show resolved Hide resolved
src/steps/relay.py Outdated Show resolved Hide resolved
tests/relay/test_publish.py Outdated Show resolved Hide resolved
tests/relay/test_publish.py Show resolved Hide resolved
tests/relay/test_publish.py Outdated Show resolved Hide resolved
@fbarbu15
Copy link
Collaborator Author

I really like this! Just a comment that may or may not be helpful. Unless you specifically want to use discv5, I also think it is a good idea to connect nodes manually. It is an admin API method, so you have to enable it with --rpc-admin=true. I guess depending on the test case, this may be more handy than have to wait for the discovery protocol connections. Also, you get a bool with the success or failure of the connection, that you can use to keep going with the test or assert the error. Just a comment, of course.

Cool work!

If it speeds up tests then I will

LGTM! Just added a few small suggestions/improvements that you can pay attention to if you feel like so 😄

Thanks for the suggestions Alex!
Implemented most of them

@AlbertoSoutullo
Copy link
Collaborator

Ok, I don't think I have anything else to add after that review.
You are in good hands with Python Alex's reviews.

Copy link
Collaborator

@romanzac romanzac left a comment

Choose a reason for hiding this comment

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

Florin, you are moving at great leaps forward. Thanks!

@fbarbu15
Copy link
Collaborator Author

Florin, you are moving at great leaps forward. Thanks!

Thanks @romanzac ! Usually it starts fast but when it's mature enough it slows down

@fbarbu15 fbarbu15 merged commit 589368f into master Nov 17, 2023
1 of 2 checks passed
@fbarbu15 fbarbu15 deleted the tests/relay-publish-2 branch November 20, 2023 14:34
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

4 participants