diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60771233..d7cc48fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: [1.14.x, 1.15.x] + go-version: [1.15.x] platform: [ubuntu-latest] steps: @@ -28,7 +28,7 @@ jobs: ${{ runner.os }}-go- - name: Install dependencies - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0 + run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0 - name: Run test suite run: make test diff --git a/core/internal/consumer/kafka_zk_test.go b/core/internal/consumer/kafka_zk_test.go index 7e565c48..8f27108d 100644 --- a/core/internal/consumer/kafka_zk_test.go +++ b/core/internal/consumer/kafka_zk_test.go @@ -178,8 +178,8 @@ func TestKafkaZkClient_watchGroupList(t *testing.T) { func TestKafkaZkClient_resetOffsetWatchAndSend_BadPath(t *testing.T) { mockZookeeper := helpers.MockZookeeperClient{} - mockZookeeper.On("GetW", "/consumers/testgroup/offsets/testtopic/0").Return([]byte("81234"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) - mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil) + mockZookeeper.On("GetW", "/consumers/testgroup/offsets/testtopic/0").Return([]byte("81234"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) // nolint:gocritic + mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil) // nolint:gocritic module := fixtureKafkaZkModule() module.Configure("test", "consumer.test") @@ -200,7 +200,7 @@ func TestKafkaZkClient_resetOffsetWatchAndSend_BadOffset(t *testing.T) { offsetStat := &zk.Stat{Mtime: 894859} newWatchEventChan := make(chan zk.Event) mockZookeeper.On("GetW", "/consumers/testgroup/offsets/testtopic/0").Return([]byte("notanumber"), offsetStat, func() <-chan zk.Event { return newWatchEventChan }(), nil) - mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil) + mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil) // nolint:gocritic // This will block if a storage request is sent, as nothing is watching that channel module.running.Add(1) @@ -218,7 +218,7 @@ func TestKafkaZkClient_resetOffsetWatchAndSend_BadOffset(t *testing.T) { func TestKafkaZkClient_resetPartitionListWatchAndAdd_BadPath(t *testing.T) { mockZookeeper := helpers.MockZookeeperClient{} - mockZookeeper.On("ChildrenW", "/consumers/testgroup/offsets/testtopic").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) + mockZookeeper.On("ChildrenW", "/consumers/testgroup/offsets/testtopic").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) // nolint:gocritic module := fixtureKafkaZkModule() module.Configure("test", "consumer.test") @@ -252,7 +252,7 @@ func TestKafkaZkClient_resetTopicListWatchAndAdd_BadPath(t *testing.T) { func TestKafkaZkClient_resetGroupListWatchAndAdd_BadPath(t *testing.T) { mockZookeeper := helpers.MockZookeeperClient{} - mockZookeeper.On("ChildrenW", "/consumers").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) + mockZookeeper.On("ChildrenW", "/consumers").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) // nolint:gocritic module := fixtureKafkaZkModule() module.Configure("test", "consumer.test")