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

Issue 54690051: state: add MongoSession method

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by rog
Modified:
10 years, 2 months ago
Reviewers:
dimitern, natefinch, mp+205013
Visibility:
Public.

Description

state: add MongoSession method The replica set worker needs it to maintain the replica set. https://code.launchpad.net/~rogpeppe/juju-core/495-state-mongosession/+merge/205013 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : state: add MongoSession method #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/state.go View 1 1 chunk +8 lines, -0 lines 0 comments Download
M state/state_test.go View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
10 years, 2 months ago (2014-02-05 17:24:46 UTC) #1
natefinch
LGTM
10 years, 2 months ago (2014-02-05 17:34:01 UTC) #2
dimitern
LGTM https://codereview.appspot.com/54690051/diff/1/state/state.go File state/state.go (right): https://codereview.appspot.com/54690051/diff/1/state/state.go#newcode119 state/state.go:119: func (st *State) MongoSession() *mgo.Session { doc comment, ...
10 years, 2 months ago (2014-02-05 17:38:43 UTC) #3
rog
10 years, 2 months ago (2014-02-05 17:47:25 UTC) #4
Please take a look.

https://codereview.appspot.com/54690051/diff/1/state/state.go
File state/state.go (right):

https://codereview.appspot.com/54690051/diff/1/state/state.go#newcode119
state/state.go:119: func (st *State) MongoSession() *mgo.Session {
On 2014/02/05 17:38:43, dimitern wrote:
> doc comment, incl. why do we expose this?

Done.

https://codereview.appspot.com/54690051/diff/1/state/state_test.go
File state/state_test.go (right):

https://codereview.appspot.com/54690051/diff/1/state/state_test.go#newcode64
state/state_test.go:64: c.Assert(s.State.MongoSession(), gc.Not(gc.IsNil))
On 2014/02/05 17:38:43, dimitern wrote:
> How about some checking on the session object (i.e. c.Assert(session.Ping(),
> IsNil))?

Done.
Sign in to reply to this message.

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