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

interop: update --fail_on_failed_rpc to wait for initial success #3763

Merged
merged 4 commits into from
Jul 28, 2020

Conversation

ericgribkoff
Copy link
Contributor

Analogous to grpc/grpc#23629

cc @menghanl

@@ -58,6 +58,7 @@ var (
mu sync.Mutex
currentRequestID int32
watchers = make(map[statsWatcherKey]*statsWatcher)
rpcSucceeded bool
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no atomic boolean, but you can use int + atomic, like this: https://github.com/grpc/grpc-go/blob/master/internal/profiling/profiling.go#L49

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

)

type statsService struct {
testpb.UnimplementedLoadBalancerStatsServiceServer
}

func HasRpcSucceeded() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to export this and the other function.

RPC, not Rpc, otherwise go lint will complain.

And call this setRPCSucceeded()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome, I am up to page 3 of a tour of Go now: https://tour.golang.org/basics/3 :-)

Done (I think!)

@ericgribkoff ericgribkoff force-pushed the delayed_fail_on_failed_rpc branch from 10bf0ee to 8e08486 Compare July 28, 2020 16:56
@ericgribkoff
Copy link
Contributor Author

merged this with master to incorporate the new changes from #3737

Copy link
Contributor

@menghanl menghanl left a comment

Choose a reason for hiding this comment

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

LGTM

@menghanl menghanl merged commit 0e6096e into grpc:master Jul 28, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
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.

2 participants