Skip to content

Commit ac06b1f

Browse files
committed
Fix index-lifecycle-6.x build
1 parent 0c84651 commit ac06b1f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,17 @@ static void setRandomMasterTimeout(MasterNodeRequest<?> request, Map<String, Str
17391739
}
17401740
}
17411741

1742+
static void setRandomMasterTimeout(Consumer<TimeValue> setter, TimeValue defaultTimeout,
1743+
Map<String, String> expectedParams) {
1744+
if (randomBoolean()) {
1745+
TimeValue masterTimeout = TimeValue.parseTimeValue(randomTimeValue(), "random_master_timeout");
1746+
setter.accept(masterTimeout);
1747+
expectedParams.put("master_timeout", masterTimeout.getStringRep());
1748+
} else {
1749+
expectedParams.put("master_timeout", defaultTimeout.getStringRep());
1750+
}
1751+
}
1752+
17421753
static void setRandomWaitForActiveShards(Consumer<ActiveShardCount> setter, Map<String, String> expectedParams) {
17431754
setRandomWaitForActiveShards(setter, ActiveShardCount.DEFAULT, expectedParams);
17441755
}

0 commit comments

Comments
 (0)