1
1
//go:build !go_tarantool_call_17
2
2
// +build !go_tarantool_call_17
3
3
4
- package connection_pool_test
4
+ package pool_test
5
5
6
6
import (
7
7
"testing"
8
8
9
9
"github.com/stretchr/testify/require"
10
- "github.com/tarantool/go-tarantool/connection_pool "
10
+ "github.com/tarantool/go-tarantool/pool "
11
11
"github.com/tarantool/go-tarantool/test_helpers"
12
12
)
13
13
@@ -17,14 +17,14 @@ func TestCall(t *testing.T) {
17
17
err := test_helpers .SetClusterRO (servers , connOpts , roles )
18
18
require .Nilf (t , err , "fail to set roles for cluster" )
19
19
20
- connPool , err := connection_pool .Connect (servers , connOpts )
20
+ connPool , err := pool .Connect (servers , connOpts )
21
21
require .Nilf (t , err , "failed to connect" )
22
22
require .NotNilf (t , connPool , "conn is nil after Connect" )
23
23
24
24
defer connPool .Close ()
25
25
26
26
// PreferRO
27
- resp , err := connPool .Call ("box.info" , []interface {}{}, connection_pool .PreferRO )
27
+ resp , err := connPool .Call ("box.info" , []interface {}{}, pool .PreferRO )
28
28
require .Nilf (t , err , "failed to Call" )
29
29
require .NotNilf (t , resp , "response is nil after Call" )
30
30
require .GreaterOrEqualf (t , len (resp .Data ), 1 , "response.Data is empty after Call" )
@@ -35,7 +35,7 @@ func TestCall(t *testing.T) {
35
35
require .Truef (t , ro , "expected `true` with mode `PreferRO`" )
36
36
37
37
// PreferRW
38
- resp , err = connPool .Call ("box.info" , []interface {}{}, connection_pool .PreferRW )
38
+ resp , err = connPool .Call ("box.info" , []interface {}{}, pool .PreferRW )
39
39
require .Nilf (t , err , "failed to Call" )
40
40
require .NotNilf (t , resp , "response is nil after Call" )
41
41
require .GreaterOrEqualf (t , len (resp .Data ), 1 , "response.Data is empty after Call" )
@@ -46,7 +46,7 @@ func TestCall(t *testing.T) {
46
46
require .Falsef (t , ro , "expected `false` with mode `PreferRW`" )
47
47
48
48
// RO
49
- resp , err = connPool .Call ("box.info" , []interface {}{}, connection_pool .RO )
49
+ resp , err = connPool .Call ("box.info" , []interface {}{}, pool .RO )
50
50
require .Nilf (t , err , "failed to Call" )
51
51
require .NotNilf (t , resp , "response is nil after Call" )
52
52
require .GreaterOrEqualf (t , len (resp .Data ), 1 , "response.Data is empty after Call" )
@@ -57,7 +57,7 @@ func TestCall(t *testing.T) {
57
57
require .Truef (t , ro , "expected `true` with mode `RO`" )
58
58
59
59
// RW
60
- resp , err = connPool .Call ("box.info" , []interface {}{}, connection_pool .RW )
60
+ resp , err = connPool .Call ("box.info" , []interface {}{}, pool .RW )
61
61
require .Nilf (t , err , "failed to Call" )
62
62
require .NotNilf (t , resp , "response is nil after Call" )
63
63
require .GreaterOrEqualf (t , len (resp .Data ), 1 , "response.Data is empty after Call" )
0 commit comments