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

Add master server unit test #3086

Merged
merged 6 commits into from
Jul 30, 2017

Conversation

Yancey1989
Copy link
Contributor

Fixed #3079

Copy link
Contributor

@helinwang helinwang left a comment

Choose a reason for hiding this comment

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

LGTM++!

Some minor comments.

Btw, CI reports:

[03:54:01]	make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
[03:54:01]	make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
[03:54:04]	[ERROR]	[mFailed to install: Unable to get repository
[03:54:04]	Unable to get repository
[03:54:04]	Unable to get repository
[03:54:04]	CMakeFiles/go_vendor.dir/build.make:60: recipe for target 'glide' failed
[03:54:04]	CMakeFiles/Makefile2:432: recipe for target 'CMakeFiles/go_vendor.dir/all' failed
[03:54:04]	make[2]: *** [glide] Error 1
[03:54:04]	make[1]: *** [CMakeFiles/go_vendor.dir/all] Error 2
[03:54:04]	make[1]: *** Waiting for unfinished jobs....
[03:54:07]	Note: checking out '9f75c5aa851cd877fb0d93ccc31b8567a6706546'.

log.Fatal(err)
}
defer func() {
e.Close()
Copy link
Contributor

@helinwang helinwang Jul 27, 2017

Choose a reason for hiding this comment

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

Need to handle error, otherwise gometalinter check would not pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that Close() function return nothing.

defer func() {
e.Close()
if err := os.RemoveAll(etcdDir); err != nil {
log.Fatal(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could use t.Fatal(err) here.

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.

}()
select {
case <-e.Server.ReadyNotify():
log.Printf("Server is ready!")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe t.Log would be better (prints only when test failed or -v is specified). Same for other places.

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.

@helinwang
Copy link
Contributor

helinwang commented Jul 28, 2017

CI failed because the develop branch is not building. Please rebase / pull new develop, it contains the fix.

@Yancey1989
Copy link
Contributor Author

Thanks @helinwang , fixed the CI failed.

@Yancey1989 Yancey1989 merged commit 53ea896 into PaddlePaddle:develop Jul 30, 2017
@Yancey1989 Yancey1989 deleted the add_etcd_unittest branch July 30, 2017 02:07
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.

2 participants