Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/5745#discussion_r176677259
--- Diff: flink-end-to-end-tests/test-scripts/test_resume_savepoint.sh ---
@@ -17,11 +17,25 @@
# limitations under the License.
################################################################################
+if [ -z $1 ] || [ -z $2 ]; then
+ echo "Usage: ./test_resume_savepoint.sh <original_dop> <new_dop>"
+ exit 1
+fi
+
source "$(dirname "$0")"/common.sh
-# modify configuration to have 2 slots
+ORIGINAL_DOP=$1
+NEW_DOP=$2
+
+if (( $ORIGINAL_DOP >= $NEW_DOP )); then
+ NUM_SLOTS=$(( $ORIGINAL_DOP + 1 ))
+else
+ NUM_SLOTS=$(( $NEW_DOP + 1 ))
+fi
+
+# modify configuration to have enough slots
cp $FLINK_DIR/conf/flink-conf.yaml $FLINK_DIR/conf/flink-conf.yaml.bak
-sed -i -e 's/taskmanager.numberOfTaskSlots:
1/taskmanager.numberOfTaskSlots: 2/' $FLINK_DIR/conf/flink-conf.yaml
+sed -i -e "s/taskmanager.numberOfTaskSlots:
1/taskmanager.numberOfTaskSlots: $NUM_SLOTS/" $FLINK_DIR/conf/flink-conf.yaml
# modify configuration to use SLF4J reporter; we will be using this to
monitor the state machine progress
cp $FLINK_DIR/opt/flink-metrics-slf4j-1.6-SNAPSHOT.jar $FLINK_DIR/lib/
--- End diff --
can we define the version as an environment variable in the common.sh?
---