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

pubsub: deflake tests #220

Merged
merged 7 commits into from
Apr 4, 2017
Merged

pubsub: deflake tests #220

merged 7 commits into from
Apr 4, 2017

Conversation

broady
Copy link
Contributor

@broady broady commented Apr 3, 2017

Add the Project ID as a prefix to ensure tests can run in parallel.

Fixes #219.

Add the Project ID as a prefix to ensure tests can run in parallel.

Fixes #219.
@broady
Copy link
Contributor Author

broady commented Apr 3, 2017

Also seeing this, which seems to be correlated to pub/sub IAM tests:

=== RUN   TestIAM
2017/04/03 18:48:16 rpc error: code = Unavailable desc = there is no address available
FAIL	github.com/GoogleCloudPlatform/golang-samples/pubsub/subscriptions	3.068s

and...

=== RUN   TestIAM
2017/04/03 11:53:35 rpc error: code = Unavailable desc = grpc: the connection is closing

@broady
Copy link
Contributor Author

broady commented Apr 4, 2017

/cc @rakyll

Copy link
Contributor

@rakyll rakyll left a comment

Choose a reason for hiding this comment

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

Left some nits, otherwise LGTM.

r.Errorf("getPolicy: %v", err)
}
if role, member := iam.Editor, "group:cloud-logs@google.com"; !policy.HasRole(member, role) {
r.Errorf("want %q as viewer, got %v", member, policy)
Copy link
Contributor

Choose a reason for hiding this comment

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

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 values aren't being checked for equality.

It's more like got HasRole(role, member)=false; want true; policy = %v

r.Errorf("want %q as viewer, got %v", member, policy)
}
if role, member := iam.Viewer, iam.AllUsers; !policy.HasRole(member, role) {
r.Errorf("want %q as viewer, got %v", member, policy)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@broady broady merged commit d62326a into master Apr 4, 2017
@broady broady deleted the deflake_pubsub branch April 4, 2017 04:02
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.

pubsub: tests are flaky
2 participants