Skip to content

Commit

Permalink
[hotfix][tests] e2e/common.sh: add -type parameter to find
Browse files Browse the repository at this point in the history
This prevents "Is a directory" error when running "head":
Checking for exceptions...
Found exception in log files; printing first 500 lines; see full logs for details:
head: error reading '/home/vsts/work/1/s/flink-dist/target/flink-1.12-SNAPSHOT-bin/flink-1.12-SNAPSHOT/log/': Is a directory
  • Loading branch information
rkhachatryan authored and pnowojski committed Aug 20, 2020
1 parent b995359 commit f8ce30a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flink-end-to-end-tests/test-scripts/common.sh
Expand Up @@ -367,7 +367,7 @@ function check_logs_for_errors {
| grep -ic "error" || true)
if [[ ${error_count} -gt 0 ]]; then
echo "Found error in log files; printing first 500 lines; see full logs for details:"
find $FLINK_DIR/log/ -exec head -n 500 {} \;
find $FLINK_DIR/log/ -type f -exec head -n 500 {} \;
EXIT_CODE=1
else
echo "No errors in log files."
Expand Down Expand Up @@ -404,7 +404,7 @@ function check_logs_for_exceptions {
| grep -ic "exception" || true)
if [[ ${exception_count} -gt 0 ]]; then
echo "Found exception in log files; printing first 500 lines; see full logs for details:"
find $FLINK_DIR/log/ -exec head -n 500 {} \;
find $FLINK_DIR/log/ -type f -exec head -n 500 {} \;
EXIT_CODE=1
else
echo "No exceptions in log files."
Expand All @@ -426,7 +426,7 @@ function check_logs_for_non_empty_out_files {
| grep "." \
> /dev/null; then
echo "Found non-empty .out files; printing first 500 lines; see full logs for details:"
find $FLINK_DIR/log/ -name '*.out' -exec head -n 500 {} \;
find $FLINK_DIR/log/ -type f -name '*.out' -exec head -n 500 {} \;
EXIT_CODE=1
else
echo "No non-empty .out files."
Expand Down

0 comments on commit f8ce30a

Please sign in to comment.