@@ -631,9 +631,9 @@ if [[ ("$python_xlang_kafka_taxi_dataflow" = true
631631 if [[ " $python_xlang_kafka_taxi_dataflow " = true ]]; then
632632 gcloud container clusters create --project=${USER_GCP_PROJECT} --region=${USER_GCP_REGION} --no-enable-ip-alias $CLUSTER_NAME
633633 kubectl apply -R -f ${LOCAL_BEAM_DIR} /.test-infra/kubernetes/kafka-cluster
634- echo " * Please wait for 5 mins to let a Kafka cluster be launched on GKE."
635- echo " * Sleeping for 5 mins"
636- sleep 5m
634+ echo " * Please wait for 10 mins to let a Kafka cluster be launched on GKE."
635+ echo " * Sleeping for 10 mins"
636+ sleep 10m
637637 else
638638 echo " * Skip Kafka cluster setup"
639639 fi
@@ -690,7 +690,12 @@ if [[ ("$python_xlang_kafka_taxi_dataflow" = true
690690 echo " * How to verify results:"
691691 echo " * 1. Goto your Dataflow job console and check whether there is any error."
692692 echo " * 2. Check whether ${KAFKA_TAXI_DF_DATASET} .xlang_kafka_taxi has data, retrieving BigQuery data as below: "
693- bq head -n 10 ${KAFKA_TAXI_DF_DATASET} .xlang_kafka_taxi
693+ test_output=$( bq head -n 10 ${KAFKA_TAXI_DF_DATASET} .xlang_kafka_taxi)
694+ echo " $test_output "
695+ if ! grep -q " passenger_count" <<< " $test_output" ; then
696+ echo " Couldn't find expected output. Please confirm the output by visiting the console manually."
697+ exit 1
698+ fi
694699 echo " ***************************************************************"
695700 else
696701 echo " * Skip Python XLang Kafka Taxi with DataflowRunner"
@@ -729,7 +734,12 @@ if [[ ("$python_xlang_kafka_taxi_dataflow" = true
729734 echo " * 2. Check whether your ${SQL_TAXI_SUBSCRIPTION} subscription has data below:"
730735 # run twice since the first execution would return 0 messages
731736 gcloud pubsub subscriptions pull --project=${USER_GCP_PROJECT} --limit=5 ${SQL_TAXI_SUBSCRIPTION}
732- gcloud pubsub subscriptions pull --project=${USER_GCP_PROJECT} --limit=5 ${SQL_TAXI_SUBSCRIPTION}
737+ test_output=$( gcloud pubsub subscriptions pull --project=${USER_GCP_PROJECT} --limit=5 ${SQL_TAXI_SUBSCRIPTION} )
738+ echo " $test_output "
739+ if ! grep -q " ride_status" <<< " $test_output" ; then
740+ echo " Couldn't find expected output. Please confirm the output by visiting the console manually."
741+ exit 1
742+ fi
733743 echo " ***************************************************************"
734744 else
735745 echo " * Skip Python XLang SQL Taxi with DataflowRunner"
0 commit comments