|
9 | 9 | "bytes"
|
10 | 10 | "context"
|
11 | 11 | "fmt"
|
12 |
| - "math/rand" |
13 | 12 | "regexp"
|
14 | 13 | "strconv"
|
15 | 14 | "strings"
|
@@ -702,9 +701,17 @@ func TestRowLevelTTLJobRandomEntries(t *testing.T) {
|
702 | 701 | // causes parsing errors.
|
703 | 702 | case types.CollatedStringFamily:
|
704 | 703 | if typ.Oid() != oidext.T_citext && typ.Oid() != oidext.T__citext {
|
705 |
| - // TODO(foundations): CITEXT should only be prohibited when |
706 |
| - // running with mixed 25.2 version where the type is not |
707 |
| - // supported. |
| 704 | + if int(clusterversion.MinSupported) >= int(clusterversion.V25_3) { |
| 705 | + // CITEXT is only supported in 25.3+, so if we happen to run |
| 706 | + // the test in the mixed version variant, we can't use the |
| 707 | + // type. |
| 708 | + indexableTyps = append(indexableTyps, typ) |
| 709 | + } |
| 710 | + } |
| 711 | + case types.LTreeFamily: |
| 712 | + if int(clusterversion.MinSupported) >= int(clusterversion.V25_4) { |
| 713 | + // LTREE is only supported in 25.4+, so if we happen to run the |
| 714 | + // test in the mixed version variant, we can't use the type. |
708 | 715 | indexableTyps = append(indexableTyps, typ)
|
709 | 716 | }
|
710 | 717 | default:
|
@@ -956,7 +963,7 @@ func TestRowLevelTTLJobRandomEntries(t *testing.T) {
|
956 | 963 |
|
957 | 964 | for _, tc := range testCases {
|
958 | 965 | t.Run(tc.desc, func(t *testing.T) {
|
959 |
| - runAtMixedClusterVersion := rand.Intn(2) == 0 |
| 966 | + runAtMixedClusterVersion := rng.Intn(2) == 0 |
960 | 967 | // Log to make it slightly easier to reproduce a random config.
|
961 | 968 | t.Logf("test case (runAtMixedClusterVersion=%t): %#v", runAtMixedClusterVersion, tc)
|
962 | 969 | th, cleanupFunc := newRowLevelTTLTestJobTestHelper(
|
|
0 commit comments