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

Dynamic mock client (2) #21

Merged
merged 8 commits into from
Jun 15, 2024
Merged

Dynamic mock client (2) #21

merged 8 commits into from
Jun 15, 2024

Conversation

johnstonematt
Copy link
Contributor

No description provided.

@johnstonematt johnstonematt changed the title Dynamic mock client Dynamic mock client (2) Jun 14, 2024
Base automatically changed from static-mock-client to provider-interface June 14, 2024 19:18
Dockerfile Show resolved Hide resolved
cmd/solana_exporter/dynamic_test.go Show resolved Hide resolved
cmd/solana_exporter/dynamic_test.go Outdated Show resolved Hide resolved
cmd/solana_exporter/dynamic_test.go Show resolved Hide resolved
cmd/solana_exporter/exporter_test.go Outdated Show resolved Hide resolved
cmd/solana_exporter/slots.go Outdated Show resolved Hide resolved
cmd/solana_exporter/static_test.go Show resolved Hide resolved
prometheus.NewPedanticRegistry().MustRegister(collector)
ctx, cancel := context.WithCancel(context.Background())
go collector.WatchSlots(ctx)
time.Sleep(1 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

A waitgroup (from the sync package) is probably too much for tests, but is this necessary? Generally speaking, I see most code like this as code smell.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is to let the exporter run for a bit before we test it, to make sure it has gathered metrics before we go look what those metrics are and test them.

cmd/solana_exporter/static_test.go Outdated Show resolved Hide resolved
@@ -1,10 +1,21 @@
module github.com/certusone/solana_exporter

go 1.13
go 1.22
Copy link
Contributor

Choose a reason for hiding this comment

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

Just pull this in from your rebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Go Update PR was to merge that branch into this branch

Base automatically changed from provider-interface to master June 15, 2024 07:44
@johnstonematt johnstonematt merged commit fb8dfb1 into master Jun 15, 2024
@johnstonematt johnstonematt deleted the dynamic-mock-client branch June 15, 2024 08:00
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.

2 participants