File tree 3 files changed +11
-6
lines changed
src/test/java/org/elasticsearch/packaging/util
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ NODE_SETTINGS
80
80
81
81
password=$( cat /tmp/bootstrap.password)
82
82
clusterHealth=$( sudo curl -u " elastic:$password " -H " Content-Type: application/json" \
83
- -XGET " http://127.0.0.1:9200/_cluster/health?wait_for_status=green&timeout=30s " )
83
+ -XGET " http://127.0.0.1:9200/_cluster/health?wait_for_status=green&timeout=180s " )
84
84
echo " $clusterHealth " | grep ' "status":"green"' || {
85
85
echo " Expected cluster health to be green but got:"
86
86
echo " $clusterHealth "
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ run_elasticsearch_service() {
349
349
if [ " $expectedStatus " = 0 ]; then
350
350
background=" -d"
351
351
else
352
- timeoutCommand=" timeout 60s "
352
+ timeoutCommand=" timeout 180s "
353
353
fi
354
354
# su and the Elasticsearch init script work together to break bats.
355
355
# sudo isolates bats enough from the init script so everything continues
@@ -476,10 +476,10 @@ wait_for_elasticsearch_status() {
476
476
477
477
if [ -z " index" ]; then
478
478
echo " Tring to connect to elasticsearch and wait for expected status $desiredStatus ..."
479
- curl -sS " http://localhost:9200/_cluster/health?wait_for_status=$desiredStatus &timeout=60s &pretty"
479
+ curl -sS " http://localhost:9200/_cluster/health?wait_for_status=$desiredStatus &timeout=180s &pretty"
480
480
else
481
481
echo " Trying to connect to elasticsearch and wait for expected status $desiredStatus for index $index "
482
- curl -sS " http://localhost:9200/_cluster/health/$index ?wait_for_status=$desiredStatus &timeout=60s &pretty"
482
+ curl -sS " http://localhost:9200/_cluster/health/$index ?wait_for_status=$desiredStatus &timeout=180s &pretty"
483
483
fi
484
484
if [ $? -eq 0 ]; then
485
485
echo " Connected"
Original file line number Diff line number Diff line change @@ -37,8 +37,13 @@ public class ServerUtils {
37
37
38
38
protected static final Logger logger = LogManager .getLogger (ServerUtils .class );
39
39
40
- private static final long waitTime = TimeUnit .SECONDS .toMillis (60 );
41
- private static final long timeoutLength = TimeUnit .SECONDS .toMillis (10 );
40
+ // generous timeout as nested virtualization can be quite slow ...
41
+ private static final long waitTime = TimeUnit .MINUTES .toMillis (
42
+ System .getProperty ("tests.inVM" ) == null ? 3 : 1
43
+ );
44
+ private static final long timeoutLength = TimeUnit .SECONDS .toMillis (
45
+ System .getProperty ("tests.inVM" ) == null ? 30 : 10
46
+ );
42
47
43
48
public static void waitForElasticsearch (Installation installation ) throws IOException {
44
49
waitForElasticsearch ("green" , null , installation );
You can’t perform that action at this time.
0 commit comments