Debian Codegraph @

cluster_test.go

raw symbols SCIP
1 package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/
2
3 import (
4 "bytesscip-go gomod github.com/golang/go/src go1.14 bytes/"
5 "encoding/binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/"
6 "encoding/jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/"
7 "fmtscip-go gomod github.com/golang/go/src go1.14 fmt/"
8 "github.com/stretchr/testify/mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/"
9 testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/ "gopkg.in/check.v1scip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/"
10 "gopkg.in/rethinkdb/rethinkdb-go.v6/encodingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/"
11 pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/ "gopkg.in/rethinkdb/rethinkdb-go.v6/ql2scip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/"
12 "ioscip-go gomod github.com/golang/go/src go1.14 io/"
13 "netscip-go gomod github.com/golang/go/src go1.14 net/"
14 "timescip-go gomod github.com/golang/go/src go1.14 time/"
15 )
16
17 type ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite# struct{}
18
19 var _ = testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Suitescip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Suite().(&ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#{})
20
21 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewSingle_NoDiscover_Okscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewSingle_NoDiscover_Ok().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
22 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
23 node1 := "node1"
24
25 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
26 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn1, 1, node1)
27 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
28 conn2 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
29 conn2.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
30
31 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
32 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
33 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn2, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
34
35 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
36 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1}
37 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
38 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
39 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
40 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
41 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
42 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
43 }
44
45 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
46 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
47 conn1.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
48 conn2.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
49 err = cluster.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#Close().()
50 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
51 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
52 conn2.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
53 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1, conn2)
54 }
55
56 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewMultiple_NoDiscover_Okscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewMultiple_NoDiscover_Ok().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
57 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
58 host2 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host2", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
59 node1 := "node1"
60 node2 := "node2"
61
62 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
63 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn1, 1, node1)
64 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
65 conn2 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
66 conn2.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
67 conn3 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
68 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn3, 1, node2)
69 conn3.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
70 conn4 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
71 conn4.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
72
73 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
74 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
75 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn2, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
76 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn3, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
77 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn4, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
78
79 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
80 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1, host2}
81 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
82 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
83 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
84 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
85 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
86 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
87 }
88
89 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
90 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
91 conn1.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
92 conn2.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
93 conn3.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
94 conn4.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
95 err = cluster.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#Close().()
96 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
97 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
98 conn2.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
99 conn3.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
100 conn4.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
101 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1, conn2, conn3, conn4)
102 }
103
104 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewSingle_NoDiscover_DialFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewSingle_NoDiscover_DialFail().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
105 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
106
107 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
108 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
109
110 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
111 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1}
112 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
113 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
114 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
115 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
116 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
117 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
118 }
119
120 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
121 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.)
122 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock)
123 }
124
125 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewMultiple_NoDiscover_DialHalfFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewMultiple_NoDiscover_DialHalfFail().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
126 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
127 host2 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host2", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
128 node1 := "node1"
129
130 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
131 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn1, 1, node1)
132 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
133 conn2 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
134 conn2.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
135
136 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
137 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
138 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn2, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
139 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
140
141 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
142 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1, host2}
143 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
144 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
145 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
146 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
147 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
148 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
149 }
150
151 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
152 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
153 conn1.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
154 conn2.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
155 err = cluster.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#Close().()
156 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
157 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
158 conn2.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
159 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1, conn2)
160 }
161
162 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewMultiple_NoDiscover_DialFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewMultiple_NoDiscover_DialFail().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
163 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
164 host2 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host2", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
165
166 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
167 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
168 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
169
170 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
171 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1, host2}
172 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
173 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
174 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
175 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
176 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
177 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
178 }
179
180 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
181 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.)
182 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock)
183 }
184
185 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewSingle_NoDiscover_ServerFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewSingle_NoDiscover_ServerFail().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
186 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
187
188 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
189 expectServerQueryFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQueryFail().(conn1, 1, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.)
190 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
191
192 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
193 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
194
195 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
196 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1}
197 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
198 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
199 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
200 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
201 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
202 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
203 }
204
205 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
206 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.NotNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/NotNil.)
207 if _, ok := err.(RQLConnectionErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLConnectionError#); ok {
208 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., RQLConnectionErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLConnectionError#{rqlErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError#(ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF..Error())})
209 } else {
210 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., ErrConnectionClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrConnectionClosed.)
211 }
212 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
213 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1)
214 }
215
216 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewSingle_NoDiscover_PingFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewSingle_NoDiscover_PingFail().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
217 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
218 node1 := "node1"
219
220 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
221 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn1, 1, node1)
222 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
223
224 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
225 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
226 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
227
228 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{}
229 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1}
230 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
231 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
232 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
233 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
234 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
235 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
236 }
237
238 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
239 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., ioscip-go gomod github.com/golang/go/src go1.14 io/.EOFscip-go gomod github.com/golang/go/src go1.14 io/EOF.)
240 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
241 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1)
242 }
243
244 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewSingle_Discover_Okscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewSingle_Discover_Ok().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
245 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
246 host2 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "1.1.1.1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 2222}
247 host3 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "2.2.2.2", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 3333}
248 node1 := "node1"
249 node2 := "node2"
250 node3 := "node3"
251
252 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
253 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn1, 1, node1)
254 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
255 conn2 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
256 expectServerStatusscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerStatus().(conn2, 1, []string{node1, node2, node3}, []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1, host2, host3})
257 conn2.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
258 conn3 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
259 conn3.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
260 conn4 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{} // doesn't need call Server() due to it's known through ServerStatus()
261 conn4.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
262
263 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
264 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
265 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn2, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
266 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn3, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
267 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host3.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn4, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
268
269 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{DiscoverHostsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#DiscoverHosts.: true}
270 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1}
271 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
272 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
273 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
274 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
275 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
276 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
277 discoverIntervalscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#discoverInterval.: 10 * timescip-go gomod github.com/golang/go/src go1.14 time/.Secondscip-go gomod github.com/golang/go/src go1.14 time/Second.,
278 }
279
280 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
281 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
282 conn1.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
283 conn2.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
284 conn3.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
285 conn4.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
286 for !cluster.nodeExistsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#nodeExists().(node2) || !cluster.nodeExistsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#nodeExists().(node3) { // wait node to be added to list to be closed with cluster
287 timescip-go gomod github.com/golang/go/src go1.14 time/.Sleepscip-go gomod github.com/golang/go/src go1.14 time/Sleep().(timescip-go gomod github.com/golang/go/src go1.14 time/.Millisecondscip-go gomod github.com/golang/go/src go1.14 time/Millisecond.)
288 }
289 err = cluster.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#Close().()
290 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
291 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
292 conn2.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
293 conn3.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
294 conn4.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
295 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1, conn2, conn3, conn4)
296 }
297
298 func (s *ClusterSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#) TestCluster_NewMultiple_Discover_Okscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ClusterSuite#TestCluster_NewMultiple_Discover_Ok().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
299 host1 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host1", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28015}
300 host2 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "host2", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 28016}
301 host3 := Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.: "2.2.2.2", Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.: 3333}
302 node1 := "node1"
303 node2 := "node2"
304 node3 := "node3"
305
306 conn1 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
307 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn1, 1, node1)
308 conn1.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
309 conn2 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
310 expectServerStatusscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerStatus().(conn2, 1, []string{node1, node2, node3}, []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1, host2, host3})
311 conn2.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
312 conn3 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
313 expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn3, 1, node2)
314 conn3.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
315 conn4 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{}
316 conn4.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
317 conn5 := &connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#{} // doesn't need call Server() due to it's known through ServerStatus()
318 conn5.onCloseReturnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#onCloseReturn().(nil)
319
320 dialMock := &mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#{}
321 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn1, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
322 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host1.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn2, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
323 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn3, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
324 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host2.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn4, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
325 dialMock.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Dial", host3.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().()).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(conn5, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().()
326
327 opts := &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{DiscoverHostsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#DiscoverHosts.: true}
328 seeds := []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#{host1, host2}
329 cluster := &Clusterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#{
330 hpscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#hp.: newHostPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newHostPool().(opts),
331 seedsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#seeds.: seeds,
332 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#opts.: opts,
333 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#closed.: clusterWorkingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/clusterWorking.,
334 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#connFactory.: mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dialMock),
335 discoverIntervalscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#discoverInterval.: 10 * timescip-go gomod github.com/golang/go/src go1.14 time/.Secondscip-go gomod github.com/golang/go/src go1.14 time/Second.,
336 }
337
338 err := cluster.runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#run().()
339 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
340 conn1.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
341 conn2.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
342 conn3.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
343 conn4.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
344 conn5.waitDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDial().()
345 for !cluster.nodeExistsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#nodeExists().(node3) { // wait node to be added to list to be closed with cluster
346 timescip-go gomod github.com/golang/go/src go1.14 time/.Sleepscip-go gomod github.com/golang/go/src go1.14 time/Sleep().(timescip-go gomod github.com/golang/go/src go1.14 time/.Millisecondscip-go gomod github.com/golang/go/src go1.14 time/Millisecond.)
347 }
348 err = cluster.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cluster#Close().()
349 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
350 conn1.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
351 conn2.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
352 conn3.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
353 conn4.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
354 conn5.waitDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#waitDone().()
355 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.AssertExpectationsForObjectsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/AssertExpectationsForObjects().(c, dialMock, conn1, conn2, conn3, conn4, conn5)
356 }
357
358 type mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial# struct {
359 mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Mockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#Mock.
360 }
361
362 func mockedConnectionFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockedConnectionFactory().(dial *mockDialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/mockDial#) connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connFactory# {
363 return func(host string, opts *ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#) (connection *Connectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#, err error) {
364 args := dial.MethodCalledscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#MethodCalled().("Dial", host)
365 err = args.Errorscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Error().(1)
366 if err != nil {
367 return nil, err
368 }
369
370 connection = newConnectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newConnection().(args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(0).(netscip-go gomod github.com/golang/go/src go1.14 net/.Connscip-go gomod github.com/golang/go/src go1.14 net/Conn#), host, opts)
371 done := runConnectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/runConnection().(connection)
372
373 m := args.Getscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#Get().(0).(*connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#)
374 m.setDonescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#setDone().(done)
375
376 return connection, nil
377 }
378 }
379
380 func expectServerQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQuery().(conn *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#, token int64, nodeID string) {
381 writeChan := make(chan struct{})
382 readChan := make(chan struct{})
383
384 rawQ := makeServerQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerQueryRaw().(token)
385 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Write", rawQ).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(0, nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
386 close(writeChan)
387 })
388
389 rawR := makeServerResponseRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerResponseRaw().(token, nodeID)
390 rawH := makeResponseHeaderRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeResponseHeaderRaw().(token, len(rawR))
391
392 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Read", respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(rawH, len(rawH), nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
393 <-writeChan
394 close(readChan)
395 })
396 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Read", len(rawR)).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(rawR, len(rawR), nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
397 <-readChan
398 })
399 }
400
401 func expectServerQueryFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerQueryFail().(conn *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#, token int64, err error) {
402 writeChan := make(chan struct{})
403
404 rawQ := makeServerQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerQueryRaw().(token)
405 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Write", rawQ).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(0, nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
406 close(writeChan)
407 })
408
409 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Read", respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(nil, 0, err, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
410 <-writeChan
411 })
412 }
413
414 func makeServerQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerQueryRaw().(token int64) []byte {
415 buf := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{}
416 buf.Growscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Grow().(respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.)
417 buf.Writescip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Write().(buf.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()[:respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.])
418 enc := jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.NewEncoderscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/NewEncoder().(buf)
419
420 q := Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#{
421 Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Token.: token,
422 Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Type.: pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Query_SERVER_INFOscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Query_SERVER_INFO.,
423 }
424
425 err := enc.Encodescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Encoder#Encode().(q.Buildscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Build().())
426 if err != nil {
427 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode failed: %v", err))
428 }
429 b := buf.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()
430 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint64scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint64().(b, uint64(q.Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Token.))
431 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint32scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint32().(b[8:], uint32(len(b)-respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.))
432 return b
433 }
434
435 func makeResponseHeaderRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeResponseHeaderRaw().(token int64, respLen int) []byte {
436 buf1 := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{}
437 buf1.Growscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Grow().(respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.)
438 buf1.Writescip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Write().(buf1.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()[:respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.]) // reserve for header
439 b1 := buf1.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()
440 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint64scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint64().(b1, uint64(token))
441 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint32scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint32().(b1[8:], uint32(respLen))
442 return b1
443 }
444
445 func makeServerResponseRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerResponseRaw().(token int64, nodeID string) []byte {
446 buf2 := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{}
447 enc := jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.NewEncoderscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/NewEncoder().(buf2)
448
449 coded, err := encodingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/.Encodescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Encode().(&ServerResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ServerResponse#{IDscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ServerResponse#ID.: nodeID})
450 if err != nil {
451 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode response failed: %v", err))
452 }
453 jresp, err := jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.Marshalscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Marshal().(coded)
454 if err != nil {
455 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode response failed: %v", err))
456 }
457
458 resp := Responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#{Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Token.: token, Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Type.: pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_SERVER_INFOscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_SERVER_INFO., Responsesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Responses.: []jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.RawMessagescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/RawMessage#{jresp}}
459 err = enc.Encodescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Encoder#Encode().(resp)
460 if err != nil {
461 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode failed: %v", err))
462 }
463
464 return buf2.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()
465 }
466
467 func expectServerStatusscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/expectServerStatus().(conn *connMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connMock#, token int64, nodeIDs []string, hosts []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#) {
468 writeChan := make(chan struct{})
469 readHChan := make(chan struct{})
470 readRChan := make(chan struct{})
471
472 rawQ := makeServerStatusQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerStatusQueryRaw().(token)
473 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Write", rawQ).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(0, nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
474 close(writeChan)
475 })
476
477 rawR := makeServerStatusResponseRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerStatusResponseRaw().(token, nodeIDs, hosts)
478 rawH := makeResponseHeaderRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeResponseHeaderRaw().(token, len(rawR))
479
480 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Read", respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(rawH, len(rawH), nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
481 <-writeChan
482 close(readHChan)
483 })
484 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Read", len(rawR)).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(rawR, len(rawR), nil, nil).Oncescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Once().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
485 <-readHChan
486 close(readRChan)
487 })
488
489 rawQ2 := makeContinueQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeContinueQueryRaw().(token)
490 // maybe - connection may be closed until cursor fetchs next batch
491 conn.Onscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Mock#On().("Write", rawQ2).Returnscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Return().(0, nil, nil).Maybescip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Maybe().().Runscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Call#Run().(func(args mockscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/.Argumentsscip-go gomod github.com/stretchr/testify v1.5.1 `github.com/stretchr/testify/mock`/Arguments#) {
492 <-readRChan
493 })
494 }
495
496 func makeServerStatusQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerStatusQueryRaw().(token int64) []byte {
497 buf := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{}
498 buf.Growscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Grow().(respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.)
499 buf.Writescip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Write().(buf.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()[:respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.]) // reserve for header
500 enc := jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.NewEncoderscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/NewEncoder().(buf)
501
502 t := DBscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DB().(SystemDatabasescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/SystemDatabase.).Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Table().(ServerStatusSystemTablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ServerStatusSystemTable.).Changesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Changes().(ChangesOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangesOpts#{IncludeInitialscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangesOpts#IncludeInitial.: true})
503 q, err := newQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newQuery().(t, map[string]interface{}{}, &ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#{})
504 if err != nil {
505 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must newQuery failed: %v", err))
506 }
507 q.Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Token. = token
508
509 err = enc.Encodescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Encoder#Encode().(q.Buildscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Build().())
510 if err != nil {
511 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode failed: %v", err))
512 }
513
514 b := buf.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()
515 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint64scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint64().(b, uint64(q.Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Token.))
516 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint32scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint32().(b[8:], uint32(len(b)-respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.))
517 return b
518 }
519
520 func makeServerStatusResponseRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeServerStatusResponseRaw().(token int64, nodeIDs []string, hosts []Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#) []byte {
521 buf2 := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{}
522 enc := jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.NewEncoderscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/NewEncoder().(buf2)
523
524 type change struct {
525 NewVal *nodeStatusscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatus# `rethinkdb:"new_val"`
526 OldVal *nodeStatusscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatus# `rethinkdb:"old_val"`
527 }
528 jresps := make([]jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.RawMessagescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/RawMessage#, len(nodeIDs))
529 for i := range nodeIDs {
530 status := &nodeStatusscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatus#{IDscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatus#ID.: nodeIDs[i], Networkscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatus#Network.: nodeStatusNetworkscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatusNetwork#{
531 ReqlPortscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatusNetwork#ReqlPort.: int64(hosts[i].Portscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Port.),
532 CanonicalAddressesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatusNetwork#CanonicalAddresses.: []nodeStatusNetworkAddrscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatusNetworkAddr#{
533 {Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/nodeStatusNetworkAddr#Host.: hosts[i].Namescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#Name.},
534 },
535 }}
536
537 coded, err := encodingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/.Encodescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Encode().(&change{NewVal: status})
538 if err != nil {
539 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode response failed: %v", err))
540 }
541 jresps[i], err = jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.Marshalscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Marshal().(coded)
542 if err != nil {
543 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode response failed: %v", err))
544 }
545 }
546
547 resp := Responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#{Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Token.: token, Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Type.: pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_SUCCESS_PARTIALscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_SUCCESS_PARTIAL., Responsesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Responses.: jresps}
548 err := enc.Encodescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Encoder#Encode().(resp)
549 if err != nil {
550 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode failed: %v", err))
551 }
552 return buf2.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()
553 }
554
555 func makeContinueQueryRawscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/makeContinueQueryRaw().(token int64) []byte {
556 buf := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{}
557 buf.Growscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Grow().(respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.)
558 buf.Writescip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Write().(buf.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()[:respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.]) // reserve for header
559 enc := jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.NewEncoderscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/NewEncoder().(buf)
560
561 q := Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#{Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Token.: token, Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Type.: pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Query_CONTINUEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Query_CONTINUE.}
562 err := enc.Encodescip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Encoder#Encode().(q.Buildscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Build().())
563 if err != nil {
564 panic(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("must encode failed: %v", err))
565 }
566
567 b := buf.Bytesscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#Bytes().()
568 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint64scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint64().(b, uint64(q.Tokenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#Token.))
569 binaryscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/LittleEndian..PutUint32scip-go gomod github.com/golang/go/src go1.14 `encoding/binary`/littleEndian#PutUint32().(b[8:], uint32(len(b)-respHeaderLenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/respHeaderLen.))
570 return b
571 }