From issues-return-153795-archive-asf-public=cust-asf.ponee.io@flink.apache.org Mon Feb 19 13:13:33 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3290B1807A1 for ; Mon, 19 Feb 2018 13:13:33 +0100 (CET) Received: (qmail 22559 invoked by uid 500); 19 Feb 2018 12:13:31 -0000 Mailing-List: contact issues-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 issues@flink.apache.org Received: (qmail 22366 invoked by uid 99); 19 Feb 2018 12:13:31 -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; Mon, 19 Feb 2018 12:13:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 94957E5E08; Mon, 19 Feb 2018 12:13:29 +0000 (UTC) From: pnowojski To: issues@flink.apache.org Reply-To: issues@flink.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request #5500: [FLINK-8667] expose key in KeyedBroadcastProcessFu... Content-Type: text/plain Message-Id: <20180219121330.94957E5E08@git1-us-west.apache.org> Date: Mon, 19 Feb 2018 12:13:29 +0000 (UTC) Github user pnowojski commented on a diff in the pull request: https://github.com/apache/flink/pull/5500#discussion_r169055575 --- Diff: flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/BroadcastStateITCase.java --- @@ -145,17 +147,16 @@ public Watermark checkAndGetNextWatermark(T lastElement, long extractedTimestamp private static final long serialVersionUID = 7616910653561100842L; private final Map expectedState; - - private final long timerTimestamp; + private final AtomicLong al = new AtomicLong(1000L); + // + private final Map expectedTimeAndKey = new HashMap<>(); + // + private final Map expectedKeyAndTime = new HashMap<>(); private transient MapStateDescriptor descriptor; - TestBroadcastProcessFunction( - final long timerTS, - final Map expectedBroadcastState - ) { + TestBroadcastProcessFunction(final Map expectedBroadcastState) { --- End diff -- Please keep the `timerTS` (renaming it to `initialTimerTimestamp`) parameter as an initial value for the `nextTimerTimestamp`/`al` field that you have added. Otherwise it's confusing where does this magic value `1000` come from and what are consequences of changing it. Especially that you have kept the original comment `// the timestamp should be high enough to trigger the timer after all the elements arrive.` in the `testConnectWithBroadcastTranslation()`. ---