ydb-platform / ydb-go-sdk

Pure Go native and database/sql driver for YDB
https://ydb.tech
Apache License 2.0
132 stars 69 forks source link

bug: flacky sometimes topic unit tests failed #741

Open ImpressionableRaccoon opened 1 year ago

ImpressionableRaccoon commented 1 year ago

Bug Report

Environment

GitHub Actions tests on PR

Current behavior:

Sometimes topic unit tests failed

Related code:

Actions run: https://github.com/ydb-platform/ydb-go-sdk/actions/runs/5021628277/jobs/9004199455#step:4:64

Test: https://github.com/ydb-platform/ydb-go-sdk/blob/4471f632612040e723fc0c74ece6ca9050dc87a4/internal/topic/topicreaderinternal/batcher_test.go#L224

Other information:

Restarting the test helps

rekby commented 1 year ago
panic: Fail in goroutine after TestBatcher_Pop/CloseBatcherWhilePopWait has completed

goroutine 4577 [running]:
testing.(*common).Fail(0xc0002324e0)
    C:/hostedtoolcache/windows/go/1.20.4/x[64](https://github.com/ydb-platform/ydb-go-sdk/actions/runs/5021628277/jobs/9004199455#step:4:65)/src/testing/testing.go:933 +0x1a8
testing.(*common).Errorf(0xc0002324e0, {0xe34c3b, 0x3}, {0xc0004200c0, 0x1, 0x1})
    C:/hostedtoolcache/windows/go/1.20.4/x64/src/testing/testing.go:1050 +0xaf
github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest.(*testWrapper).Errorf(0xc0004c94f0, {0xe34c3b, 0x3}, {0xc0004200c0, 0x1, 0x1})
    D:/a/ydb-go-sdk/ydb-go-sdk/internal/xtest/manytimes.go:103 +0xa5
github.com/stretchr/testify/assert.Fail({0x25cc4a0, 0xc0004c94f0}, {0xc0004d60c0, 0xbf}, {0x0, 0x0, 0x0})
    C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/testify@v1.7.1/assert/assertions.go:262 +0x412
github.com/stretchr/testify/assert.ErrorIs({0x25cc4a0, 0xc0004c94f0}, {0xf51cc0, 0xc00045a030}, {0xf4f200?, 0xc00048cdc0?}, {0x0, 0x0, 0x0})
    C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/testify@v1.7.1/assert/assertions.go:1[75](https://github.com/ydb-platform/ydb-go-sdk/actions/runs/5021628277/jobs/9004199455#step:4:76)1 +0x1c5
github.com/stretchr/testify/require.ErrorIs({0x25cc458, 0xc0004c94f0}, {0xf51cc0, 0xc00045a030}, {0xf4f200, 0xc00048cdc0}, {0x0, 0x0, 0x0})
    C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/testify@v1.7.1/require/require.go:319 +0xc9
github.com/ydb-platform/ydb-go-sdk/v3/internal/topic/topicreaderinternal.TestBatcher_Pop.func7.1()
    D:/a/ydb-go-sdk/ydb-go-sdk/internal/topic/topicreaderinternal/batcher_test.go:239 +0x106
created by github.com/ydb-platform/ydb-go-sdk/v3/internal/topic/topicreaderinternal.TestBatcher_Pop.func7
    D:/a/ydb-go-sdk/ydb-go-sdk/internal/topic/topicreaderinternal/batcher_test.go:235 +0x55b
FAIL    github.com/ydb-platform/ydb-go-sdk/v3/internal/topic/topicreaderinternal    2.1[76](https://github.com/ydb-platform/ydb-go-sdk/actions/runs/5021628277/jobs/9004199455#step:4:77)s