Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6D99C200CDE for ; Tue, 8 Aug 2017 13:54:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6BF781671DA; Tue, 8 Aug 2017 11:54:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AFDD01671D6 for ; Tue, 8 Aug 2017 13:54:34 +0200 (CEST) Received: (qmail 72726 invoked by uid 500); 8 Aug 2017 11:54:33 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 72717 invoked by uid 99); 8 Aug 2017 11:54:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2017 11:54:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C8116F3276; Tue, 8 Aug 2017 11:54:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aljoscha@apache.org To: commits@flink.apache.org Date: Tue, 08 Aug 2017 11:54:33 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] flink git commit: [FLINK-7300] Fix unstable Kafka end-to-end tests archived-at: Tue, 08 Aug 2017 11:54:35 -0000 Repository: flink Updated Branches: refs/heads/master 6f5fa7f74 -> 2ed74ca06 [FLINK-7300] Fix unstable Kafka end-to-end tests Instead of specifying a timeout for the console consumer we now speciy an uppper message boundary that matches our expected number of messages. The timout was to unstable because it could sometimes return even though messages were in fact available. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/65402e03 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/65402e03 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/65402e03 Branch: refs/heads/master Commit: 65402e034c32e47824fe46427d83eb9c9ea22d30 Parents: 6f5fa7f Author: Aljoscha Krettek Authored: Mon Aug 7 18:08:03 2017 +0200 Committer: Aljoscha Krettek Committed: Tue Aug 8 13:53:18 2017 +0200 ---------------------------------------------------------------------- .../end-to-end-test/test_streaming_kafka010.sh | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/65402e03/test-infra/end-to-end-test/test_streaming_kafka010.sh ---------------------------------------------------------------------- diff --git a/test-infra/end-to-end-test/test_streaming_kafka010.sh b/test-infra/end-to-end-test/test_streaming_kafka010.sh index f358e24..cce8db4 100755 --- a/test-infra/end-to-end-test/test_streaming_kafka010.sh +++ b/test-infra/end-to-end-test/test_streaming_kafka010.sh @@ -73,24 +73,7 @@ $FLINK_DIR/bin/flink run -d build-target/examples/streaming/Kafka010Example.jar # send some data to Kafka echo -e "hello\nwhats\nup" | $KAFKA_DIR/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test-input -# wait at most (roughly) 5 minutes until the results are there -for i in {1..300}; do - DATA_FROM_KAFKA=$($KAFKA_DIR/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test-output --from-beginning --timeout-ms 0 2> /dev/null) - - # make sure we have actual newlines in the string, not "\n" - EXPECTED=$(printf "PREFIX:hello\nPREFIX:whats\nPREFIX:up") - - if [[ "$DATA_FROM_KAFKA" == "$EXPECTED" ]]; then - echo -e "Retrieved data from Kafka: --$DATA_FROM_KAFKA--" - break - fi - - echo "Waiting for results from Kafka..." - sleep 1 -done - -# verify again to set the PASS variable -DATA_FROM_KAFKA=$($KAFKA_DIR/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test-output --from-beginning --timeout-ms 0 2> /dev/null) +DATA_FROM_KAFKA=$($KAFKA_DIR/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test-output --from-beginning --max-messages 3 2> /dev/null) # make sure we have actual newlines in the string, not "\n" EXPECTED=$(printf "PREFIX:hello\nPREFIX:whats\nPREFIX:up")