You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/27 11:32:49 UTC

[GitHub] tillrohrmann closed pull request #6941: [BP-1.6][FLINK-10692] Harden Confluent schema registry E2E test

tillrohrmann closed pull request #6941: [BP-1.6][FLINK-10692] Harden Confluent schema registry E2E test
URL: https://github.com/apache/flink/pull/6941
 
 
   

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/kafka-common.sh b/flink-end-to-end-tests/test-scripts/kafka-common.sh
index 26f3f6ee82d..2dc58f7305a 100644
--- a/flink-end-to-end-tests/test-scripts/kafka-common.sh
+++ b/flink-end-to-end-tests/test-scripts/kafka-common.sh
@@ -135,16 +135,29 @@ function start_confluent_schema_registry {
 
   # wait until the schema registry REST endpoint is up
   for i in {1..30}; do
-    QUERY_RESULT=$(curl "${SCHEMA_REGISTRY_URL}/subjects" 2> /dev/null || true)
-
-    if [[ ${QUERY_RESULT} =~ \[.*\] ]]; then
+    if get_and_verify_schema_subjects_exist; then
         echo "Schema registry is up."
-        break
+        return 0
     fi
 
     echo "Waiting for schema registry..."
     sleep 1
   done
+
+  if ! get_and_verify_schema_subjects_exist; then
+      echo "Could not start confluent schema registry"
+      exit 1
+  fi
+}
+
+function get_schema_subjects {
+    curl "${SCHEMA_REGISTRY_URL}/subjects" 2> /dev/null || true
+}
+
+function get_and_verify_schema_subjects_exist {
+    QUERY_RESULT=$(get_schema_subjects)
+
+    [[ ${QUERY_RESULT} =~ \[.*\] ]]
 }
 
 function stop_confluent_schema_registry {


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services