Skip to content

Commit

Permalink
Restore TestQueryErrorNext's original iter.Next.
Browse files Browse the repository at this point in the history
  • Loading branch information
niemeyer committed Feb 1, 2016
1 parent 85d1795 commit 43c7554
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bulk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (s *S) TestBulkUpdateAll(c *C) {

bulk := coll.Bulk()
bulk.UpdateAll(M{"n": 1}, M{"$set": M{"n": 10}})
bulk.UpdateAll(M{"n": 2}, M{"$set": M{"n": 2}})
bulk.UpdateAll(M{"n": 2}, M{"$set": M{"n": 2}}) // Won't change.
bulk.UpdateAll(M{"n": 5}, M{"$set": M{"n": 50}}) // Won't match.
bulk.UpdateAll(M{}, M{"$inc": M{"n": 1}}, M{"n": 11}, M{"$set": M{"n": 5}})
r, err := bulk.Run()
Expand Down
3 changes: 2 additions & 1 deletion session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2742,7 +2742,8 @@ func (s *S) TestQueryErrorNext(c *C) {

iter := coll.Find(M{"a": 1}).Select(M{"a": M{"b": 1}}).Iter()

ok := iter.Next(nil)
var result struct{}
ok := iter.Next(&result)
c.Assert(ok, Equals, false)

err = iter.Close()
Expand Down

0 comments on commit 43c7554

Please sign in to comment.