Merge lp:~niemeyer/gozk/fix-exists into lp:gozk/zookeeper

Proposed by Gustavo Niemeyer
Status: Merged
Merged at revision: 29
Proposed branch: lp:~niemeyer/gozk/fix-exists
Merge into: lp:gozk/zookeeper
Diff against target: 30 lines (+3/-1)
3 files modified
.lbox (+1/-0)
zk.go (+1/-1)
zk_test.go (+1/-0)
To merge this branch: bzr merge lp:~niemeyer/gozk/fix-exists
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+93266@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Reviewers: mp+93266_code.launchpad.net,

Message:
Please take a look.

Description:

https://code.launchpad.net/~niemeyer/gozk/fix-exists/+merge/93266

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/5673057/

Affected files:
   A .lbox
   M zk.go
   M zk_test.go

Index: .lbox
=== <email address hidden> >
<email address hidden>
=== added file '.lbox'
--- .lbox 1970-01-01 00:00:00 +0000
+++ .lbox 2012-02-15 18:05:29 +0000
@@ -0,0 +1,1 @@
+propose -cr -for lp:gozk/zookeeper

Index: zk.go
=== <email address hidden> >
<email address hidden>
=== modified file 'zk.go'
--- zk.go 2012-02-15 17:18:34 +0000
+++ zk.go 2012-02-15 17:51:23 +0000
@@ -574,7 +574,7 @@
   defer C.free(unsafe.Pointer(cpath))

   var cstat Stat
- rc, cerr := C.zoo_wexists(conn.handle, cpath, nil, nil, &stat.c)
+ rc, cerr := C.zoo_wexists(conn.handle, cpath, nil, nil, &cstat.c)

   // We diverge a bit from the usual here: a ZNONODE is not an error
   // for an exists call, otherwise every Exists call would have to check

Index: zk_test.go
=== <email address hidden> >
<email address hidden>
=== modified file 'zk_test.go'
--- zk_test.go 2012-02-15 17:18:34 +0000
+++ zk_test.go 2012-02-15 17:51:23 +0000
@@ -399,6 +399,7 @@

   stat, err = conn.Exists("/zookeeper")
   c.Assert(err, IsNil)
+ c.Assert(stat.NumChildren(), Equals, 1)
  }

  func (s *S) TestExistsAndWatch(c *C) {

Revision history for this message
William Reade (fwereade) wrote :
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.lbox'
2--- .lbox 1970-01-01 00:00:00 +0000
3+++ .lbox 2012-02-15 18:15:23 +0000
4@@ -0,0 +1,1 @@
5+propose -cr -for lp:gozk/zookeeper
6
7=== modified file 'zk.go'
8--- zk.go 2012-02-15 17:18:34 +0000
9+++ zk.go 2012-02-15 18:15:23 +0000
10@@ -574,7 +574,7 @@
11 defer C.free(unsafe.Pointer(cpath))
12
13 var cstat Stat
14- rc, cerr := C.zoo_wexists(conn.handle, cpath, nil, nil, &stat.c)
15+ rc, cerr := C.zoo_wexists(conn.handle, cpath, nil, nil, &cstat.c)
16
17 // We diverge a bit from the usual here: a ZNONODE is not an error
18 // for an exists call, otherwise every Exists call would have to check
19
20=== modified file 'zk_test.go'
21--- zk_test.go 2012-02-15 17:18:34 +0000
22+++ zk_test.go 2012-02-15 18:15:23 +0000
23@@ -399,6 +399,7 @@
24
25 stat, err = conn.Exists("/zookeeper")
26 c.Assert(err, IsNil)
27+ c.Assert(stat.NumChildren(), Equals, 1)
28 }
29
30 func (s *S) TestExistsAndWatch(c *C) {

Subscribers

People subscribed via source and target branches