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

Failing test #1962

Closed
TheTincho opened this Issue Sep 8, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@TheTincho
Copy link
Contributor

TheTincho commented Sep 8, 2016

Hi,

When building prometheus 1.1.1 for Debian, I have one test failing:

=== RUN   TestTargetSetRecreatesTargetGroupsEveryRun
time="2016-09-08T09:01:12Z" level=error msg="Error refreshing DNS targets: could
 not resolve srv.name.one.example.org: No server responded" source="dns.go:118" 
--- FAIL: TestTargetSetRecreatesTargetGroupsEveryRun (5.00s)
        targetmanager_test.go:36: 'dns/0/srv.name.one.example.org' should be present in TargetSet.tgroups: map[]

FAIL
exit status 1
FAIL    github.com/prometheus/prometheus/retrieval      8.587s

I don't know if this is really trying to access the network or not. In any case, it is a problem: Debian builds are forbidden from trying to access the network at all.

This is running with golang 1.7

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Sep 8, 2016

Perhaps the test wants the negative response from the network that srv.name.one.example.org doesn't exist.

And yes, that's something we should avoid.

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Sep 8, 2016

@dmilstein it seems you added that test. Do you have time to rewrite it to not depend on a internet connection / working DNS discovery?

@dmilstein

This comment has been minimized.

Copy link
Contributor

dmilstein commented Sep 8, 2016

Drat, didn't realize it was actually resolving. Yep, I'll take a look and fix that.

Sorry about that,
D

iPhone brevity in effect

On Sep 8, 2016, at 4:02 PM, Tobias Schmidt notifications@github.com wrote:

@dmilstein it seems you added that test. Do you have time to rewrite it to not depend on a internet connection / working DNS discovery?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

dmilstein added a commit to dmilstein/prometheus that referenced this issue Sep 8, 2016

Fix broken test which relied on DNS resolution prometheus#1962
Switched to testing by way of the static_configs rather than
dns_sd_config parameter.  Verified that the revised test both passes
without network access, and also still catches the bug it's supposed to
cover.

grobie added a commit that referenced this issue Sep 8, 2016

Merge pull request #1966 from dmilstein/make-test-not-hit-internet
Fix broken test which relied on DNS resolution #1962
@grobie

This comment has been minimized.

Copy link
Member

grobie commented Sep 8, 2016

Fixed with #1966

@grobie grobie closed this Sep 8, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.