From 30cf388a1ed2bb8d9336a0a6a1633677c5197b0f Mon Sep 17 00:00:00 2001 From: JmPotato Date: Wed, 28 Jun 2023 21:16:32 +0800 Subject: [PATCH] Fix the test Signed-off-by: JmPotato --- pkg/keyspace/tso_keyspace_group_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/keyspace/tso_keyspace_group_test.go b/pkg/keyspace/tso_keyspace_group_test.go index 9f6bd7aec17..40b779382cd 100644 --- a/pkg/keyspace/tso_keyspace_group_test.go +++ b/pkg/keyspace/tso_keyspace_group_test.go @@ -238,8 +238,9 @@ func (suite *keyspaceGroupTestSuite) TestKeyspaceGroupSplit() { keyspaceGroups := []*endpoint.KeyspaceGroup{ { - ID: uint32(1), - UserKind: endpoint.Basic.String(), + ID: uint32(1), + UserKind: endpoint.Basic.String(), + Keyspaces: []uint32{444}, }, { ID: uint32(2), @@ -254,7 +255,7 @@ func (suite *keyspaceGroupTestSuite) TestKeyspaceGroupSplit() { err = suite.kgm.SplitKeyspaceGroupByID(0, 4, []uint32{utils.DefaultKeyspaceID}) re.ErrorIs(err, ErrModifyDefaultKeyspace) // split the keyspace group 1 to 4 - err = suite.kgm.SplitKeyspaceGroupByID(1, 4, []uint32{333}) + err = suite.kgm.SplitKeyspaceGroupByID(1, 4, []uint32{444}) re.ErrorIs(err, ErrKeyspaceGroupNotEnoughReplicas) // split the keyspace group 2 to 4 without giving any keyspace err = suite.kgm.SplitKeyspaceGroupByID(2, 4, []uint32{}) @@ -319,7 +320,7 @@ func (suite *keyspaceGroupTestSuite) TestKeyspaceGroupSplit() { err = suite.kgm.SplitKeyspaceGroupByID(3, 5, nil) re.ErrorContains(err, ErrKeyspaceGroupNotExists(3).Error()) // split into an existing keyspace group - err = suite.kgm.SplitKeyspaceGroupByID(2, 4, nil) + err = suite.kgm.SplitKeyspaceGroupByID(2, 4, []uint32{111}) re.ErrorIs(err, ErrKeyspaceGroupExists) // split with the wrong keyspaces. err = suite.kgm.SplitKeyspaceGroupByID(2, 5, []uint32{111, 222, 444})