Skip to content

Commit 2d4a2d4

Browse files
authored
tests: fix TestKeyspaceGroupSplit (#9815)
ref #9806 Signed-off-by: Ryan Leung <rleungx@gmail.com>
1 parent d958ea3 commit 2d4a2d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/keyspace/tso_keyspace_group_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,10 @@ func (suite *keyspaceGroupTestSuite) TestKeyspaceGroupSplit() {
256256
}
257257
err := suite.kgm.CreateKeyspaceGroups(keyspaceGroups)
258258
re.NoError(err)
259-
// split the default keyspace
260-
err = suite.kgm.SplitKeyspaceGroupByID(0, 4, []uint32{constant.DefaultKeyspaceID})
261-
re.ErrorIs(err, errs.ErrModifyDefaultKeyspace)
259+
// split the bootstrap keyspace
260+
bootstrapKeyspaceID := GetBootstrapKeyspaceID()
261+
err = suite.kgm.SplitKeyspaceGroupByID(0, 4, []uint32{bootstrapKeyspaceID})
262+
re.ErrorIs(err, newModifyProtectedKeyspaceError())
262263
// split the keyspace group 1 to 4
263264
err = suite.kgm.SplitKeyspaceGroupByID(1, 4, []uint32{444})
264265
re.ErrorIs(err, errs.ErrKeyspaceGroupNotEnoughReplicas)

0 commit comments

Comments
 (0)