Restore ::singledb after cluster test (#10441)

When ::singledb is 0, we will use db 9 for the test db.
Since ::singledb is set to 1 in the cluster-related tests, but not restored, some subsequent
tests associated with db 9 will fail.
This commit is contained in:
sundb 2022-03-18 20:10:24 +08:00 committed by GitHub
parent b69636d377
commit b9656adbd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -19,6 +19,7 @@ proc csi {args} {
}
# make sure the test infra won't use SELECT
set old_singledb $::singledb
set ::singledb 1
# cluster creation is complicated with TLS, and the current tests don't really need that coverage
@ -285,3 +286,5 @@ test {Migrate the last slot away from a node using redis-cli} {
}
} ;# tags
set ::singledb $old_singledb

View File

@ -22,6 +22,7 @@ set testmodule [file normalize tests/modules/blockonkeys.so]
set testmodule_nokey [file normalize tests/modules/blockonbackground.so]
# make sure the test infra won't use SELECT
set old_singledb $::singledb
set ::singledb 1
# cluster creation is complicated with TLS, and the current tests don't really need that coverage
@ -202,4 +203,6 @@ start_server [list overrides $base_conf] {
}
}
} ;# tags
} ;# tags
set ::singledb $old_singledb