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

helper/resource: Show last state in timeout err message #8510

Merged
merged 2 commits into from Aug 28, 2016

Conversation

radeksimko
Copy link
Member

This PR is fixing a couple of existing tests that could easily report false positives and then adding a bit extra information into commonly seen error message to help the user to understand what the problem is.

Related: #8465

}

return fmt.Sprintf("timeout while waiting for state to become '%s'",
strings.Join(e.ExpectedState, ", "))
return fmt.Sprintf("timeout while waiting for %s%s",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit pick - should be a space between the %s values

@radeksimko
Copy link
Member Author

@stack72 The %s%s is actually an intention to prevent the trailing space. See line 55 where there's an extra leading space. 😉

@stack72
Copy link
Contributor

stack72 commented Aug 28, 2016

@radeksimko ah! in that case, ignore me :)

@radeksimko radeksimko merged commit 024136b into hashicorp:master Aug 28, 2016
@radeksimko radeksimko deleted the b-resource-fix-test branch August 28, 2016 16:37
jbardin added a commit that referenced this pull request Aug 30, 2016
The WaitForState method can't read the result values in a timeout
because they are still owned by the running goroutine. Keep all values
scoped inside the goroutine, and save them into an atomic.Value to be
returned.

Fixes race introduced in #8510
@ghost
Copy link

ghost commented Apr 22, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants