dawidwys closed pull request #6908: [FLINK-10220][e2e] Removing logs for
streaming sql e2e test before validation
URL: https://github.com/apache/flink/pull/6908
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/flink-end-to-end-tests/test-scripts/common.sh
b/flink-end-to-end-tests/test-scripts/common.sh
index 1dbe89a44ce..618aae8da9a 100644
--- a/flink-end-to-end-tests/test-scripts/common.sh
+++ b/flink-end-to-end-tests/test-scripts/common.sh
@@ -300,7 +300,7 @@ function start_and_wait_for_tm {
}
function check_logs_for_errors {
- if grep -rv "GroupCoordinatorNotAvailableException" $FLINK_DIR/log \
+ error_count=$(grep -rv "GroupCoordinatorNotAvailableException"
$FLINK_DIR/log \
| grep -v "RetriableCommitFailedException" \
| grep -v "NoAvailableBrokersException" \
| grep -v "Async Kafka commit failed" \
@@ -315,7 +315,8 @@ function check_logs_for_errors {
| grep -v "java.lang.NoClassDefFoundError:
org/apache/hadoop/yarn/exceptions/YarnException" \
| grep -v "java.lang.NoClassDefFoundError:
org/apache/hadoop/conf/Configuration" \
| grep -v
"org.apache.flink.fs.shaded.hadoop3.org.apache.commons.beanutils.FluentPropertyBeanIntrospector
- Error when creating PropertyDescriptor for public final void
org.apache.flink.fs.shaded.hadoop3.org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)!
Ignoring this property." \
- | grep -iq "error"; then
+ | grep -ic "error")
+ if [[ ${error_count} -gt 0 ]]; then
echo "Found error in log files:"
cat $FLINK_DIR/log/*
EXIT_CODE=1
@@ -323,24 +324,25 @@ function check_logs_for_errors {
}
function check_logs_for_exceptions {
- if grep -rv "GroupCoordinatorNotAvailableException" $FLINK_DIR/log \
- | grep -v "RetriableCommitFailedException" \
- | grep -v "NoAvailableBrokersException" \
- | grep -v "Async Kafka commit failed" \
- | grep -v "DisconnectException" \
- | grep -v "AskTimeoutException" \
- | grep -v "WARN akka.remote.transport.netty.NettyTransport" \
- | grep -v "WARN
org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline" \
- | grep -v '^INFO:.*AWSErrorCode=\[400 Bad
Request\].*ServiceEndpoint=\[https://.*\.s3\.amazonaws\.com\].*RequestType=\[HeadBucketRequest\]'
\
- | grep -v "RejectedExecutionException" \
- | grep -v "An exception was thrown by an exception handler" \
- | grep -v "Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.yarn.exceptions.YarnException" \
- | grep -v "Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.conf.Configuration" \
- | grep -v "java.lang.NoClassDefFoundError:
org/apache/hadoop/yarn/exceptions/YarnException" \
- | grep -v "java.lang.NoClassDefFoundError:
org/apache/hadoop/conf/Configuration" \
- | grep -v "java.lang.Exception: Execution was suspended" \
- | grep -v "Caused by: java.lang.Exception: JobManager is shutting down" \
- | grep -iq "exception"; then
+ exception_count=$(grep -rv "GroupCoordinatorNotAvailableException"
$FLINK_DIR/log \
+ | grep -v "RetriableCommitFailedException" \
+ | grep -v "NoAvailableBrokersException" \
+ | grep -v "Async Kafka commit failed" \
+ | grep -v "DisconnectException" \
+ | grep -v "AskTimeoutException" \
+ | grep -v "WARN akka.remote.transport.netty.NettyTransport" \
+ | grep -v "WARN
org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline" \
+ | grep -v '^INFO:.*AWSErrorCode=\[400 Bad
Request\].*ServiceEndpoint=\[https://.*\.s3\.amazonaws\.com\].*RequestType=\[HeadBucketRequest\]'
\
+ | grep -v "RejectedExecutionException" \
+ | grep -v "An exception was thrown by an exception handler" \
+ | grep -v "Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.yarn.exceptions.YarnException" \
+ | grep -v "Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.conf.Configuration" \
+ | grep -v "java.lang.NoClassDefFoundError:
org/apache/hadoop/yarn/exceptions/YarnException" \
+ | grep -v "java.lang.NoClassDefFoundError:
org/apache/hadoop/conf/Configuration" \
+ | grep -v "java.lang.Exception: Execution was suspended" \
+ | grep -v "Caused by: java.lang.Exception: JobManager is shutting down" \
+ | grep -ic "exception")
+ if [[ ${exception_count} -gt 0 ]]; then
echo "Found exception in log files:"
cat $FLINK_DIR/log/*
EXIT_CODE=1
diff --git a/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh
b/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh
index 5aca0e54f94..0aa931ef2d3 100755
--- a/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh
+++ b/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh
@@ -42,6 +42,9 @@ function sql_cleanup() {
# remove flink-table from lib folder
rm $FLINK_DIR/lib/flink-table*jar
+
+ # remove logs cause they contain exceptions that shouldn't fail the test
+ rm $FLINK_DIR/log/*
}
trap sql_cleanup INT
trap sql_cleanup EXIT
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services