Skip to content

Commit bbb3cec

Browse files
committed
test: debugging
1 parent 20dc742 commit bbb3cec

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/testing.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ jobs:
273273
cd "${SRCDIR}"
274274
make deps
275275
276+
- name: Setup tmate session
277+
uses: mxschmitt/action-tmate@v3
278+
276279
- name: Run regression tests
277280
run: |
278281
cd "${SRCDIR}"

pool/connection_pool_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,9 @@ func TestConnectionHandlerOpenUpdateClose(t *testing.T) {
11281128
connPool, err := pool.ConnectWithOpts(ctx, poolInstances, poolOpts)
11291129
require.Nilf(t, err, "failed to connect")
11301130
require.NotNilf(t, connPool, "conn is nil after Connect")
1131+
for _, err := range h.errs {
1132+
t.Errorf("pool.ConnectWithOpts: unexpected error: %s", err)
1133+
}
11311134

11321135
_, err = connPool.Call17("box.cfg", []interface{}{map[string]bool{
11331136
"read_only": true,

test_helpers/pool_helper.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ func SetInstanceRO(ctx context.Context, dialer tarantool.Dialer, connOpts tarant
202202

203203
req := tarantool.NewCallRequest("box.cfg").
204204
Args([]interface{}{map[string]bool{"read_only": isReplica}})
205-
if _, err := conn.Do(req).Get(); err != nil {
206-
return err
205+
if resp, err := conn.Do(req).Get(); err != nil {
206+
// return err
207+
return fmt.Errorf("%w: resp: %v", err, resp)
207208
}
208209

209210
return nil
@@ -250,5 +251,5 @@ func StopTarantoolInstances(instances []*TarantoolInstance) {
250251
}
251252

252253
func GetPoolConnectContext() (context.Context, context.CancelFunc) {
253-
return context.WithTimeout(context.Background(), 500*time.Millisecond)
254+
return context.WithTimeout(context.Background(), 1000*time.Millisecond)
254255
}

0 commit comments

Comments
 (0)