Skip to content

Commit d4f313e

Browse files
committed
test: try fix test
1 parent 52e6388 commit d4f313e

File tree

6 files changed

+172
-89
lines changed

6 files changed

+172
-89
lines changed

.github/workflows/reusable_testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
run_tests:
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1515
steps:
1616
- name: Clone the go-tarantool connector
1717
uses: actions/checkout@v4

.github/workflows/testing.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
# We could replace it with ubuntu-latest after fixing the bug:
2525
# https://github.com/tarantool/setup-tarantool/issues/37
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-22.04
2727

2828
strategy:
2929
fail-fast: false
@@ -100,9 +100,10 @@ jobs:
100100
run: make deps
101101

102102
- name: Run regression tests
103-
run: |
104-
make test
105-
make testrace
103+
run: make test
104+
105+
- name: Run race tests
106+
run: make testrace
106107

107108
- name: Run fuzzing tests
108109
if: ${{ matrix.fuzzing }}
@@ -116,6 +117,7 @@ jobs:
116117
make coveralls
117118
118119
- name: Check workability of benchmark tests
120+
if: matrix.golang == 'stable'
119121
run: make bench-deps bench DURATION=1x COUNT=1
120122

121123
testing_mac_os:
@@ -270,6 +272,10 @@ jobs:
270272
run: |
271273
cd "${SRCDIR}"
272274
make test
275+
276+
- name: Run race tests
277+
run: |
278+
cd "${SRCDIR}"
273279
make testrace
274280
275281
- name: Run fuzzing tests
@@ -279,6 +285,7 @@ jobs:
279285
make fuzzing TAGS="go_tarantool_decimal_fuzzing"
280286
281287
- name: Check workability of benchmark tests
288+
if: matrix.golang == 'stable'
282289
run: |
283290
cd "${SRCDIR}"
284291
make bench-deps bench DURATION=1x COUNT=1

shutdown_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func testGracefulShutdown(t *testing.T, conn *Connection, inst *test_helpers.Tar
108108
// Wait until server go down.
109109
// Server will go down only when it process all requests from our connection
110110
// (or on timeout).
111-
_, err = inst.Cmd.Process.Wait()
111+
err = inst.Wait()
112112
require.Nil(t, err)
113113
shutdownFinish := time.Now()
114114
shutdownTime := shutdownFinish.Sub(shutdownStart)
@@ -256,7 +256,7 @@ func TestNoGracefulShutdown(t *testing.T) {
256256
require.NotNilf(t, err, "sleep request error")
257257

258258
// Wait until server go down.
259-
_, err = inst.Cmd.Process.Wait()
259+
err = inst.Wait()
260260
require.Nil(t, err)
261261
shutdownFinish := time.Now()
262262
shutdownTime := shutdownFinish.Sub(shutdownStart)
@@ -327,7 +327,7 @@ func TestGracefulShutdownRespectsClose(t *testing.T) {
327327
require.NotNilf(t, err, "sleep request error")
328328

329329
// Wait until server go down.
330-
_, err = inst.Cmd.Process.Wait()
330+
err = inst.Wait()
331331
require.Nil(t, err)
332332
shutdownFinish := time.Now()
333333
shutdownTime := shutdownFinish.Sub(shutdownStart)
@@ -401,7 +401,7 @@ func TestGracefulShutdownNotRacesWithRequestReconnect(t *testing.T) {
401401

402402
// Wait until server go down.
403403
// Server is expected to go down on timeout.
404-
_, err = inst.Cmd.Process.Wait()
404+
err = inst.Wait()
405405
require.Nil(t, err)
406406

407407
// Help test helpers to properly clean up.
@@ -497,7 +497,7 @@ func TestGracefulShutdownCloseConcurrent(t *testing.T) {
497497
srvStop.Wait()
498498
require.Nil(t, sret, "No errors on server SIGTERM")
499499

500-
_, err = inst.Cmd.Process.Wait()
500+
err = inst.Wait()
501501
require.Nil(t, err)
502502

503503
// Help test helpers to properly clean up.
@@ -590,7 +590,7 @@ func TestGracefulShutdownConcurrent(t *testing.T) {
590590
caseWg.Wait()
591591
require.Nil(t, ret, "No errors on concurrent wait")
592592

593-
_, err = inst.Cmd.Process.Wait()
593+
err = inst.Wait()
594594
require.Nil(t, err)
595595

596596
// Help test helpers to properly clean up.

0 commit comments

Comments
 (0)