Skip to content

Conversation

@ylg-avalabs
Copy link
Contributor

Why this should be merged

How this works

How this was tested

How is this documented

@ylg-avalabs ylg-avalabs changed the title Improve tests Improve client test coverage Nov 17, 2025
@ylg-avalabs ylg-avalabs marked this pull request as ready for review November 17, 2025 15:52
@ylg-avalabs ylg-avalabs requested a review from a team as a code owner November 17, 2025 15:52
Comment on lines 138 to 139
// TestProposerVMAPI_CombinedQueryParamsAndHeaders verifies both work together
func TestProposerVMAPI_CombinedQueryParamsAndHeaders(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way that headers and query params interact that we need to test them together?

Copy link
Contributor

@geoff-vball geoff-vball left a comment

Choose a reason for hiding this comment

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

Just a few nits. They should also be applied to the other test in the file. Otherwise lgtm :)

Comment on lines +457 to +458
logger := logging.NoLog{}
_, err := NewDestinationClient(logger, &destinationBlockchain, time.Minute)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should just inline short declarations that are only used once.

Suggested change
logger := logging.NoLog{}
_, err := NewDestinationClient(logger, &destinationBlockchain, time.Minute)
_, err := NewDestinationClient(logging.NoLog{}, &destinationBlockchain, time.Minute)

client, err := NewDestinationClient(logger, &destinationBlockchain, time.Minute)
require.NoError(t, err)

ctx := context.Background()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ctx := context.Background()
ctx := t.Context()

Comment on lines +526 to +527
mu.Lock()
defer mu.Unlock()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this mutex is just ensuring that the handler func has finished running? But ethClient.SuggestGasTipCap(ctx) won't finish until the handlerfunc is finished, so I don't think we need it.

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