Increase timeouts for packaging tests (#48528)
This is in preparation to move to nested virtualization which is much slower than the bare metal setup we use right now, but parallelizes better resulting in a net win.t
This commit is contained in:
parent
d235576452
commit
51c1b48b24
|
@ -80,7 +80,7 @@ NODE_SETTINGS
|
||||||
|
|
||||||
password=$(cat /tmp/bootstrap.password)
|
password=$(cat /tmp/bootstrap.password)
|
||||||
clusterHealth=$(sudo curl -u "elastic:$password" -H "Content-Type: application/json" \
|
clusterHealth=$(sudo curl -u "elastic:$password" -H "Content-Type: application/json" \
|
||||||
-XGET "http://127.0.0.1:9200/_cluster/health?wait_for_status=green&timeout=30s")
|
-XGET "http://127.0.0.1:9200/_cluster/health?wait_for_status=green&timeout=180s")
|
||||||
echo "$clusterHealth" | grep '"status":"green"' || {
|
echo "$clusterHealth" | grep '"status":"green"' || {
|
||||||
echo "Expected cluster health to be green but got:"
|
echo "Expected cluster health to be green but got:"
|
||||||
echo "$clusterHealth"
|
echo "$clusterHealth"
|
||||||
|
|
|
@ -349,7 +349,7 @@ run_elasticsearch_service() {
|
||||||
if [ "$expectedStatus" = 0 ]; then
|
if [ "$expectedStatus" = 0 ]; then
|
||||||
background="-d"
|
background="-d"
|
||||||
else
|
else
|
||||||
timeoutCommand="timeout 60s "
|
timeoutCommand="timeout 180s "
|
||||||
fi
|
fi
|
||||||
# su and the Elasticsearch init script work together to break bats.
|
# su and the Elasticsearch init script work together to break bats.
|
||||||
# sudo isolates bats enough from the init script so everything continues
|
# sudo isolates bats enough from the init script so everything continues
|
||||||
|
@ -476,10 +476,10 @@ wait_for_elasticsearch_status() {
|
||||||
|
|
||||||
if [ -z "index" ]; then
|
if [ -z "index" ]; then
|
||||||
echo "Tring to connect to elasticsearch and wait for expected status $desiredStatus..."
|
echo "Tring to connect to elasticsearch and wait for expected status $desiredStatus..."
|
||||||
curl -sS "http://localhost:9200/_cluster/health?wait_for_status=$desiredStatus&timeout=60s&pretty"
|
curl -sS "http://localhost:9200/_cluster/health?wait_for_status=$desiredStatus&timeout=180s&pretty"
|
||||||
else
|
else
|
||||||
echo "Trying to connect to elasticsearch and wait for expected status $desiredStatus for index $index"
|
echo "Trying to connect to elasticsearch and wait for expected status $desiredStatus for index $index"
|
||||||
curl -sS "http://localhost:9200/_cluster/health/$index?wait_for_status=$desiredStatus&timeout=60s&pretty"
|
curl -sS "http://localhost:9200/_cluster/health/$index?wait_for_status=$desiredStatus&timeout=180s&pretty"
|
||||||
fi
|
fi
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Connected"
|
echo "Connected"
|
||||||
|
|
|
@ -37,8 +37,13 @@ public class ServerUtils {
|
||||||
|
|
||||||
protected static final Logger logger = LogManager.getLogger(ServerUtils.class);
|
protected static final Logger logger = LogManager.getLogger(ServerUtils.class);
|
||||||
|
|
||||||
private static final long waitTime = TimeUnit.SECONDS.toMillis(60);
|
// generous timeout as nested virtualization can be quite slow ...
|
||||||
private static final long timeoutLength = TimeUnit.SECONDS.toMillis(10);
|
private static final long waitTime = TimeUnit.MINUTES.toMillis(
|
||||||
|
System.getProperty("tests.inVM") == null ? 3 : 1
|
||||||
|
);
|
||||||
|
private static final long timeoutLength = TimeUnit.SECONDS.toMillis(
|
||||||
|
System.getProperty("tests.inVM") == null ? 30 : 10
|
||||||
|
);
|
||||||
|
|
||||||
public static void waitForElasticsearch(Installation installation) throws IOException {
|
public static void waitForElasticsearch(Installation installation) throws IOException {
|
||||||
waitForElasticsearch("green", null, installation);
|
waitForElasticsearch("green", null, installation);
|
||||||
|
|
Loading…
Reference in New Issue