Skip to content

Commit 20a9615

Browse files
committed
temporary commit
1 parent a6a4988 commit 20a9615

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

connection.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,15 +1454,12 @@ func isFeatureInSlice(expected iproto.Feature, actualSlice []iproto.Feature) boo
14541454
//
14551455
// Since 1.10.0
14561456
func (conn *Connection) NewWatcher(key string, callback WatchCallback) (Watcher, error) {
1457-
if conn.c == nil {
1458-
return nil, ClientError{ErrConnectionNotReady, "client connection is not ready"}
1459-
}
14601457
// We need to check the feature because the IPROTO_WATCH request is
14611458
// asynchronous. We do not expect any response from a Tarantool instance
14621459
// That's why we can't just check the Tarantool response for an unsupported
14631460
// request error.
14641461
if !isFeatureInSlice(iproto.IPROTO_FEATURE_WATCHERS,
1465-
conn.c.ProtocolInfo().Features) {
1462+
conn.serverProtocolInfo.Features) {
14661463
err := fmt.Errorf("the feature %s must be supported by connection "+
14671464
"to create a watcher", iproto.IPROTO_FEATURE_WATCHERS)
14681465
return nil, err

tarantool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4195,13 +4195,13 @@ func runTestMain(m *testing.M) int {
41954195
startOpts.MemtxUseMvccEngine = !isStreamUnsupported
41964196

41974197
inst, err := test_helpers.StartTarantool(startOpts)
4198-
defer test_helpers.StopTarantoolWithCleanup(inst)
4199-
42004198
if err != nil {
42014199
log.Printf("Failed to prepare test tarantool: %s", err)
42024200
return 1
42034201
}
42044202

4203+
defer test_helpers.StopTarantoolWithCleanup(inst)
4204+
42054205
return m.Run()
42064206
}
42074207

0 commit comments

Comments
 (0)