Reduce length of some clustering tests

Since PR #3381, the 2 tests modified here would take twice as
long (around 245 seconds) to complete.
Talking with Matthias, he suggested using a variable instead of
a const and set it to 0 for those 2 tests since they don't really
need that to be set.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2022-08-22 12:35:37 -06:00
parent 700fe48149
commit 5663bc2fa3
2 changed files with 11 additions and 1 deletions

View File

@@ -2869,6 +2869,10 @@ func TestJetStreamSuperClusterMoveCancel(t *testing.T) {
}
func TestJetStreamSuperClusterDoubleStreamMove(t *testing.T) {
// Shorten this test by factor of 2.
scaleDownDelayTicks = 0
defer func() { scaleDownDelayTicks = defaultScaleDownDelayTicks }()
server := map[string]struct{}{}
sc := createJetStreamSuperClusterWithTemplateAndModHook(t, jsClusterTempl, 4, 2,
func(serverName, clusterName, storeDir, conf string) string {
@@ -3069,6 +3073,10 @@ func TestJetStreamSuperClusterDoubleStreamMove(t *testing.T) {
}
func TestJetStreamSuperClusterPeerEvacuationAndStreamReassignment(t *testing.T) {
// Shorten this test by factor of 2.
scaleDownDelayTicks = 0
defer func() { scaleDownDelayTicks = defaultScaleDownDelayTicks }()
s := createJetStreamSuperClusterWithTemplateAndModHook(t, jsClusterTempl, 4, 2,
func(serverName, clusterName, storeDir, conf string) string {
return fmt.Sprintf("%s\nserver_tags: [cluster:%s, server:%s]", conf, clusterName, serverName)