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

try to fix unit test test_ProtoServer, test_TrainerOnePass #2414

Merged
merged 3 commits into from
Jun 7, 2017

Conversation

helinwang
Copy link
Contributor

@helinwang helinwang commented Jun 7, 2017

Fixes: #2401

fix error: /paddle/paddle/.common_test_util.sh: line 97: netstat: command not found
@helinwang helinwang force-pushed the fix_unittest branch 3 times, most recently from e894459 to c03214e Compare June 7, 2017 20:17
Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

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

LGTM

break;
}

if (errno == ECONNREFUSED) {
LOG(WARNING) << "connection refused by pserver, try again!";
if (retry_second++ >= 7) {
LOG(FATAL) << "connection refused by pserver, maybe pserver failed!";
}
std::this_thread::sleep_for(std::chrono::seconds(1));
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that retry_second is defined by never used here. Should we make this line the following?

std::this_thread::sleep_fo(std::chrono::seconds(retry_seconds);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the retry_second in the code actually means "how many second we have retried", not a backoff strategy like "how many second to wait for current retry". Maybe change to retry_count is more clear.

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. Changed to retry_count.

@helinwang helinwang merged commit 8cc4531 into PaddlePaddle:develop Jun 7, 2017
@helinwang helinwang deleted the fix_unittest branch June 7, 2017 21:51
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.

None yet

2 participants