@@ -31,14 +31,13 @@ import (
31
31
"testing"
32
32
"time"
33
33
34
- "github.com/questdb/go-questdb-client/v3"
35
34
qdb "github.com/questdb/go-questdb-client/v3"
36
35
"github.com/stretchr/testify/assert"
37
36
"github.com/stretchr/testify/require"
38
37
)
39
38
40
39
func TestBasicBehavior (t * testing.T ) {
41
- p , err := questdb .PoolFromConf ("http::addr=localhost:1234" )
40
+ p , err := qdb .PoolFromConf ("http::addr=localhost:1234" )
42
41
require .NoError (t , err )
43
42
ctx := context .Background ()
44
43
@@ -83,7 +82,7 @@ func TestFlushOnClose(t *testing.T) {
83
82
assert .NoError (t , err )
84
83
defer srv .Close ()
85
84
86
- p , err := questdb .PoolFromOptions (
85
+ p , err := qdb .PoolFromOptions (
87
86
qdb .WithHttp (),
88
87
qdb .WithAddress (srv .Addr ()),
89
88
qdb .WithAutoFlushDisabled (),
@@ -105,7 +104,7 @@ func TestFlushOnClose(t *testing.T) {
105
104
}
106
105
107
106
func TestPooledSenderDoubleClose (t * testing.T ) {
108
- p , err := questdb .PoolFromConf ("http::addr=localhost:1234" )
107
+ p , err := qdb .PoolFromConf ("http::addr=localhost:1234" )
109
108
require .NoError (t , err )
110
109
111
110
ctx := context .Background ()
@@ -123,7 +122,7 @@ func TestPooledSenderDoubleClose(t *testing.T) {
123
122
124
123
func TestMaxPoolSize (t * testing.T ) {
125
124
// Create a pool with 2 max senders
126
- p , err := questdb .PoolFromConf ("http::addr=localhost:1234" , questdb .WithMaxSenders (3 ))
125
+ p , err := qdb .PoolFromConf ("http::addr=localhost:1234" , qdb .WithMaxSenders (3 ))
127
126
require .NoError (t , err )
128
127
129
128
ctx := context .Background ()
@@ -200,7 +199,7 @@ func TestMultiThreadedPoolWritesOverHttp(t *testing.T) {
200
199
201
200
wg := & sync.WaitGroup {}
202
201
203
- pool , err := questdb .PoolFromConf (fmt .Sprintf ("http::addr=%s" , srv .Addr ()), questdb .WithMaxSenders (maxSenders ))
202
+ pool , err := qdb .PoolFromConf (fmt .Sprintf ("http::addr=%s" , srv .Addr ()), qdb .WithMaxSenders (maxSenders ))
204
203
require .NoError (t , err )
205
204
206
205
for i := 0 ; i < numThreads ; i ++ {
@@ -243,9 +242,9 @@ func TestMultiThreadedPoolWritesOverHttp(t *testing.T) {
243
242
}
244
243
245
244
func TestTcpNotSupported (t * testing.T ) {
246
- _ , err := questdb .PoolFromConf ("tcp::addr=localhost:9000" )
245
+ _ , err := qdb .PoolFromConf ("tcp::addr=localhost:9000" )
247
246
assert .ErrorContains (t , err , "tcp/s not supported for pooled senders" )
248
247
249
- _ , err = questdb .PoolFromConf ("tcps::addr=localhost:9000" )
248
+ _ , err = qdb .PoolFromConf ("tcps::addr=localhost:9000" )
250
249
assert .ErrorContains (t , err , "tcp/s not supported for pooled senders" )
251
250
}
0 commit comments