Skip to content

Commit

Permalink
Revert "Revert "[FLINK-12143][e2e] Change end-to-end tests with file …
Browse files Browse the repository at this point in the history
…system to use plugins mechanism""

This reverts commit 24246b8.
  • Loading branch information
1u0 authored and pnowojski committed Jun 19, 2019
1 parent fe92f6a commit b1d5bf9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
23 changes: 23 additions & 0 deletions flink-end-to-end-tests/test-scripts/common_dummy_fs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/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.
################################################################################

function dummy_fs_setup() {
mkdir -p "$FLINK_DIR/plugins/dummy-fs"
cp "${END_TO_END_DIR}/flink-plugins-test/target/flink-dummy-fs.jar" "${FLINK_DIR}/plugins/dummy-fs/"
}
2 changes: 1 addition & 1 deletion flink-end-to-end-tests/test-scripts/common_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ s3util="java -jar ${END_TO_END_DIR}/flink-e2e-test-utils/target/S3UtilProgram.ja
# None
###################################
function s3_setup {
add_optional_lib "s3-fs-$1"
add_optional_plugin "s3-fs-$1"
set_config_key "s3.access-key" "$IT_CASE_S3_ACCESS_KEY"
set_config_key "s3.secret-key" "$IT_CASE_S3_SECRET_KEY"
}
Expand Down
2 changes: 1 addition & 1 deletion flink-end-to-end-tests/test-scripts/test_azure_fs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ AZURE_TEST_DATA_WORDS_URI="wasbs://$IT_CASE_AZURE_CONTAINER@$IT_CASE_AZURE_ACCOU
function azure_setup {

echo "Copying flink azure jars and writing out configs"
add_optional_lib "azure-fs-hadoop"
add_optional_plugin "azure-fs-hadoop"
set_config_key "fs.azure.account.key.$IT_CASE_AZURE_ACCOUNT.blob.core.windows.net" "$IT_CASE_AZURE_ACCESS_KEY"
}

Expand Down
3 changes: 2 additions & 1 deletion flink-end-to-end-tests/test-scripts/test_batch_wordcount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ case $INPUT_TYPE in
INPUT_LOCATION="${S3_TEST_DATA_WORDS_URI}"
;;
(dummy-fs)
cp "${END_TO_END_DIR}/flink-plugins-test/target/flink-dummy-fs.jar" "${FLINK_DIR}/lib/"
source "$(dirname "$0")"/common_dummy_fs.sh
dummy_fs_setup
INPUT_LOCATION="dummy://localhost/words"
;;
(*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ case $INPUT_TYPE in
INPUT_LOCATION=${INPUT_PATH}/words
;;
(dummy-fs)
cp "${END_TO_END_DIR}/flink-plugins-test/target/flink-dummy-fs.jar" "${FLINK_DIR}/lib/"
source "$(dirname "$0")"/common_dummy_fs.sh
dummy_fs_setup
INPUT_LOCATION="dummy://localhost/words"
;;
(*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ case $INPUT_TYPE in
EXPECTED_RESULT_LOG_CONTAINS=("consummation,1" "of,14" "calamity,1")
;;
(dummy-fs)
cp "${END_TO_END_DIR}/flink-plugins-test/target/flink-dummy-fs.jar" "${FLINK_DIR}/lib/"
source "$(dirname "$0")"/common_dummy_fs.sh
dummy_fs_setup
INPUT_ARGS="--input dummy://localhost/words"
EXPECTED_RESULT_LOG_CONTAINS=("my,1" "dear,2" "world,2")
;;
Expand Down

0 comments on commit b1d5bf9

Please sign in to comment.