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
=== added file '.lbox'
--- .lbox 1970-01-01 00:00:00 +0000
+++ .lbox 2012-02-15 18:15:23 +0000
@@ -0,0 +1,1 @@
1propose -cr -for lp:gozk/zookeeper
02
=== modified file 'zk.go'
--- zk.go 2012-02-15 17:18:34 +0000
+++ zk.go 2012-02-15 18:15:23 +0000
@@ -574,7 +574,7 @@
574 defer C.free(unsafe.Pointer(cpath))574 defer C.free(unsafe.Pointer(cpath))
575575
576 var cstat Stat576 var cstat Stat
577 rc, cerr := C.zoo_wexists(conn.handle, cpath, nil, nil, &stat.c)577 rc, cerr := C.zoo_wexists(conn.handle, cpath, nil, nil, &cstat.c)
578578
579 // We diverge a bit from the usual here: a ZNONODE is not an error579 // We diverge a bit from the usual here: a ZNONODE is not an error
580 // for an exists call, otherwise every Exists call would have to check580 // for an exists call, otherwise every Exists call would have to check
581581
=== modified file 'zk_test.go'
--- zk_test.go 2012-02-15 17:18:34 +0000
+++ zk_test.go 2012-02-15 18:15:23 +0000
@@ -399,6 +399,7 @@
399399
400 stat, err = conn.Exists("/zookeeper")400 stat, err = conn.Exists("/zookeeper")
401 c.Assert(err, IsNil)401 c.Assert(err, IsNil)
402 c.Assert(stat.NumChildren(), Equals, 1)
402}403}
403404
404func (s *S) TestExistsAndWatch(c *C) {405func (s *S) TestExistsAndWatch(c *C) {

Subscribers

People subscribed via source and target branches