-
Notifications
You must be signed in to change notification settings - Fork 211
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
Convert cluster test to a testable Go example. #38
Conversation
Changed the test to be goexample complient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errorf
and code style.
examples/basic/setup_test.go
Outdated
time.Sleep(1 * time.Second) | ||
|
||
if result := nodes[0].PopMessage(); result != nil { | ||
glog.Errorf("Expected nothing in node 0, got %v", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lowercase and no punctuation for error messages.
examples/basic/setup_test.go
Outdated
} | ||
for i := 1; i < len(nodes); i++ { | ||
if result := nodes[i].PopMessage(); result == nil { | ||
fmt.Printf("Expected a message in node %d but it was blank", i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errorf
and code styling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment guideline pretty long, give me a minute to go through it
Converted the simple cluster test to be goexample compliant:
https://blog.golang.org/examples
Usage: