chore: Adjust test and add comment about DNS resolution issue for failing tests (#16200)

* chore: Add comment about DNS resolution issue for failing tests

Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>

* remove unexported-return

Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>

---------

Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>
pull/16640/head
Zhengke Zhou 1 month ago committed by GitHub
parent 44f78bb3c8
commit 45211dc72f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      discovery/zookeeper/zookeeper_test.go

@ -26,9 +26,11 @@ func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}
// TestNewDiscoveryError can fail if the DNS resolver mistakenly resolves the domain below.
// See https://github.com/prometheus/prometheus/issues/16191 for a precedent.
func TestNewDiscoveryError(t *testing.T) {
_, err := NewDiscovery(
[]string{"unreachable.test"},
[]string{"unreachable.invalid"},
time.Second, []string{"/"},
nil,
func(_ []byte, _ string) (model.LabelSet, error) { return nil, nil })

Loading…
Cancel
Save