KarmaGYZ commented on a change in pull request #10538: [FLINK-15135][e2e][Mesos] Adding e2e tests for Flink's Mesos integration URL: https://github.com/apache/flink/pull/10538#discussion_r360621410
########## File path: flink-end-to-end-tests/test-scripts/common_mesos_docker.sh ########## @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +################################################################################ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + +set -o pipefail + +source "$(dirname "$0")"/common.sh +source "$(dirname "$0")"/common_docker.sh + +MAX_RETRY_SECONDS=120 +IMAGE_BUILD_RETRIES=5 +NODENAME=${NODENAME:-`hostname -f`} + +export INPUT_VOLUME=${END_TO_END_DIR}/test-scripts/test-data + +echo "End-to-end directory $END_TO_END_DIR" + +start_time=$(date +%s) + +# make sure we stop our cluster at the end +function cluster_shutdown { + docker-compose -f $END_TO_END_DIR/test-scripts/docker-mesos-cluster/docker-compose.yml down + rm -rf ${INPUT_VOLUME}/log + rm -rf ${INPUT_VOLUME}/tmp +} +on_exit cluster_shutdown + +function start_flink_cluster_with_mesos() { + echo "Starting Flink on Mesos cluster" + build_image + + docker-compose -f $END_TO_END_DIR/test-scripts/docker-mesos-cluster/docker-compose.yml up -d + + # wait for the Mesos master and slave set up + start_time=$(date +%s) + wait_rest_endpoint_up "http://${NODENAME}:5050/slaves" "5050" "slaves" "Mesos" "\{\"slaves\":\[.+\].*\}" Review comment: Good catch! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services