rmetzger commented on a change in pull request #11630: [FLINK-16921][e2e] 
Describe all resources and show pods logs before cleanup when failed
URL: https://github.com/apache/flink/pull/11630#discussion_r403442281
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_kubernetes_embedded_job.sh
 ##########
 @@ -49,7 +54,4 @@ kubectl wait --for=condition=complete job/flink-job-cluster 
--timeout=1h
 kubectl cp `kubectl get pods | awk '/task-manager/ {print 
$1}'`:/cache/${OUTPUT_FILE} ${OUTPUT_VOLUME}/${OUTPUT_FILE}
 
 check_result_hash "WordCount" ${OUTPUT_VOLUME}/${OUTPUT_FILE} "${RESULT_HASH}"
-
-if [ $? != 0 ];then
-  debug_copy_and_show_logs
-fi
+SUCCEEDED=$?
 
 Review comment:
   I recently got to know bash traps, which are basically signal handlers.
   You can do `trap debug_and_show_logs EXIT`, which will run 
`debug_and_show_logs` whenever the script exists.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to