1- package pool
1+ package pool_test
22
33import (
44 "testing"
55
66 "github.com/tarantool/go-tarantool/v2"
7+ "github.com/tarantool/go-tarantool/v2/pool"
78)
89
910const (
@@ -12,7 +13,7 @@ const (
1213)
1314
1415func TestRoundRobinAddDelete (t * testing.T ) {
15- rr := NewRoundRobinStrategy (10 )
16+ rr := pool . NewRoundRobinStrategy (10 )
1617
1718 addrs := []string {validAddr1 , validAddr2 }
1819 conns := []* tarantool.Connection {& tarantool.Connection {}, & tarantool.Connection {}}
@@ -26,13 +27,13 @@ func TestRoundRobinAddDelete(t *testing.T) {
2627 t .Errorf ("Unexpected connection on address %s" , addr )
2728 }
2829 }
29- if ! IsEmpty (rr ) {
30+ if ! pool . IsEmpty (rr ) {
3031 t .Errorf ("RoundRobin does not empty" )
3132 }
3233}
3334
3435func TestRoundRobinAddDuplicateDelete (t * testing.T ) {
35- rr := NewRoundRobinStrategy (10 )
36+ rr := pool . NewRoundRobinStrategy (10 )
3637
3738 conn1 := & tarantool.Connection {}
3839 conn2 := & tarantool.Connection {}
@@ -43,7 +44,7 @@ func TestRoundRobinAddDuplicateDelete(t *testing.T) {
4344 if rr .DeleteConnection (validAddr1 ) != conn2 {
4445 t .Errorf ("Unexpected deleted connection" )
4546 }
46- if ! IsEmpty (rr ) {
47+ if ! pool . IsEmpty (rr ) {
4748 t .Errorf ("RoundRobin does not empty" )
4849 }
4950 if rr .DeleteConnection (validAddr1 ) != nil {
@@ -52,7 +53,7 @@ func TestRoundRobinAddDuplicateDelete(t *testing.T) {
5253}
5354
5455func TestRoundRobinGetNextConnection (t * testing.T ) {
55- rr := NewRoundRobinStrategy (10 )
56+ rr := pool . NewRoundRobinStrategy (10 )
5657
5758 addrs := []string {validAddr1 , validAddr2 }
5859 conns := []* tarantool.Connection {& tarantool.Connection {}, & tarantool.Connection {}}
@@ -70,7 +71,7 @@ func TestRoundRobinGetNextConnection(t *testing.T) {
7071}
7172
7273func TestRoundRobinStrategy_GetConnections (t * testing.T ) {
73- rr := NewRoundRobinStrategy (10 )
74+ rr := pool . NewRoundRobinStrategy (10 )
7475
7576 addrs := []string {validAddr1 , validAddr2 }
7677 conns := []* tarantool.Connection {& tarantool.Connection {}, & tarantool.Connection {}}
0 commit comments