Skip to content

Conversation

@MariusVanDerWijden
Copy link
Member

This PR extends the ethclient test suite and increases code coverage of the ethclient
package from ~15% to >55%. These tests act as early smoke tests to signal issues in the
RPC-interface. E.g. if a functionality like eth_chainId or eth_call breaks, the test
will break.

This commit extends the ethclient test suite and increases code coverage of the ethclient
package from ~15% to >55%. These tests act as early smoke tests to signal issues in the
RPC-interface. E.g. if a functionality like eth_chainId or eth_call breaks, the test
will break.
Copy link

@DGKSK8LIFE DGKSK8LIFE left a comment

Choose a reason for hiding this comment

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

Pretty elegant solution. LGTM

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM (but the tests run sequentially, with some changes they could be made to run in parallel)

@DGKSK8LIFE
Copy link

LGTM (but the tests run sequentially, with some changes they could be made to run in parallel)

Do you mean concurrently? @holiman

@holiman
Copy link
Contributor

holiman commented Jan 6, 2021

Yes. The t.Parallel() means TestEthClient can (will be ) run concurrently with other tests in the same package, but the test itself executes 8 subtests sequentially. If t.pParallel() is invoked once for each, they too will execute concurrently. Don't know if it makes any difference, depends on how fast they are already.

@MariusVanDerWijden
Copy link
Member Author

They run (all) in 0.3 seconds, so it's not really an issue

@DGKSK8LIFE
Copy link

They run (all) in 0.3 seconds, so it's not really an issue

Sure, but what about when the testing codebase scales up? You need to accommodate for said scale while maintaining the same or better performance.

@holiman
Copy link
Contributor

holiman commented Jan 6, 2021

The full suite takes 26m on appveyor, shaving subseconds isn't a priority, at least not if it means making the code uglier

@DGKSK8LIFE
Copy link

The full suite takes 26m on appveyor, shaving subseconds isn't a priority, at least not if it means making the code uglier

Agreed.

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.

4 participants