Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(362)

Issue 6822056: testing: retry MgoDial

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by dave
Modified:
13 years, 3 months ago
Reviewers:
mp+132150, niemeyer, fwereade
Visibility:
Public.

Description

testing: retry MgoDial Because mongod is not ready to accept connections immediately on start we can attempt do Dial mongo before it is ready to accept connections. Introduce a short retry attempt to give us a better chance at getting a successful connection. https://code.launchpad.net/~dave-cheney/juju-core/034-testing-mongo-not-ready/+merge/132150 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -4 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M testing/mgo.go View 2 chunks +14 lines, -4 lines 1 comment Download

Messages

Total messages: 5
dave_cheney.net
Please take a look.
13 years, 3 months ago (2012-10-30 15:55:46 UTC) #1
fwereade
LGTM
13 years, 3 months ago (2012-10-31 10:40:13 UTC) #2
niemeyer
https://codereview.appspot.com/6822056/diff/1/testing/mgo.go File testing/mgo.go (right): https://codereview.appspot.com/6822056/diff/1/testing/mgo.go#newcode102 testing/mgo.go:102: for a := mgoDialAttempt.Start(); a.Next(); { Have you seen ...
13 years, 3 months ago (2012-11-01 14:32:38 UTC) #3
dave_cheney.net
The worrying thing is, mgo.Dial already calls mgo.DialWithTimeout(10s). i'm not sure if this small attempt ...
13 years, 3 months ago (2012-11-01 14:33:31 UTC) #4
niemeyer
13 years, 3 months ago (2012-11-01 14:48:53 UTC) #5
On 2012/11/01 14:33:31, dfc wrote:
> The worrying thing is, mgo.Dial already calls mgo.DialWithTimeout(10s).
> 
> i'm not sure if this small attempt will really fix the problem.

Exactly. I don't really understand why 10s + 500ms will work when 10s doesn't.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b