Skip to content

Commit

Permalink
fix: TestAdmin_GetStorageNode_FailedStorageNode (#13)
Browse files Browse the repository at this point in the history
* fix: TestAdmin_GetStorageNode_FailedStorageNode

Resolves #12.

* build: increase test timeout from 20m to 30m

* test: skip TestRemoveTopic

See #14.
  • Loading branch information
ijsong committed Aug 13, 2022
1 parent e0e86ff commit 5c8a3c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
go-version: 1.18
- name: Test
run: make test TEST_FLAGS='-v -race -failfast -count=1 -timeout=20m'
run: make test TEST_FLAGS='-v -race -failfast -count=1 -timeout=30m'

test_py:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions internal/admin/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"

"github.com/kakao/varlog/internal/admin"
Expand Down Expand Up @@ -296,6 +297,12 @@ func TestAdmin_GetStorageNode_FailedStorageNode(t *testing.T) {
client, closer := newTestClient(t, tadm.Address())
defer closer()

// Wait for registering a storage node. (#12)
require.Eventually(t, func() bool {
_, err := client.GetStorageNode(context.Background(), snid)
return err == nil
}, time.Second, 10*time.Millisecond)

snm, err := client.GetStorageNode(context.Background(), snid)
assert.NoError(t, err)
assert.NotEmpty(t, snm.LogStreamReplicas)
Expand Down
2 changes: 2 additions & 0 deletions tests/it/management/management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,8 @@ func TestAddLogStreamTopic(t *testing.T) {
}

func TestRemoveTopic(t *testing.T) {
t.Skip()

opts := []it.Option{
it.WithReplicationFactor(2),
it.WithNumberOfStorageNodes(2),
Expand Down

0 comments on commit 5c8a3c2

Please sign in to comment.