Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

augment the hakeeperDefaultTimeout in ut to avoid TestHAKeeperCanBootstrapAndRepairShards failed #14252

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pkg/logservice/store_hakeeper_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ import (
)

const (
minIDAllocCapacity uint64 = 1024
defaultIDBatchSize uint64 = 1024 * 10
minIDAllocCapacity uint64 = 1024
defaultIDBatchSize uint64 = 1024 * 10
checkBootstrapCycles = 100
)

var (
hakeeperDefaultTimeout = 2 * time.Second
checkBootstrapCycles = 100
)

type idAllocator struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/logservice/store_hakeeper_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ func TestHAKeeperCanBootstrapAndRepairShards(t *testing.T) {
fn := func(t *testing.T, services []*Service) {
// bootstrap the cluster, 1 TN 1 Log shard, Log and HAKeeper have
// 3 replicas
hakeeperDefaultTimeout = 10 * time.Second

store1 := services[0].store
state, err := store1.getCheckerState()
require.NoError(t, err)
Expand Down
Loading