Skip to content

Commit c4691c0

Browse files
committed
remove old foreach, and use %range()
1 parent f35f2d9 commit c4691c0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/tests/modules/redis/cluster_reset.inc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ string data2
88
string data3
99
string cmdresult
1010

11-
# Some values we need for startup
12-
control.Filter-Id := { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }
13-
1411
data1 := "1-%randstr('aaaaaaaa')"
1512
data2 := "2-%randstr('aaaaaaaa')"
1613
data3 := "3-%randstr('aaaaaaaa')"
@@ -52,7 +49,7 @@ if (!redisserver || (redisserver == '')) {
5249
# - 127.0.0.1:30005 - slave
5350
# - 127.0.0.1:30003 - master [10923-16383]
5451
# - 127.0.0.1:30006 - slave
55-
foreach result (control.Filter-Id[*]) {
52+
foreach i (%range(20)) {
5653
#
5754
# Force a remap as the slaves don't show up in the cluster immediately
5855
#
@@ -86,7 +83,7 @@ foreach result (control.Filter-Id[*]) {
8683
# If the cluster is still not behaving
8784
# abandon the test to avoid false negatives
8885
#
89-
if (result == 20) {
86+
if (i == 20) {
9087
test_fail
9188
return
9289
}

0 commit comments

Comments
 (0)