flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzulitai <...@git.apache.org>
Subject [GitHub] flink pull request #5092: [FLINK-4812][metrics] Expose currentLowWatermark f...
Date Wed, 29 Nov 2017 10:01:20 GMT
Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5092#discussion_r153736758
  
    --- Diff: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/metrics/StreamOperatorWatermarkMetricsTest.java
---
    @@ -0,0 +1,96 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.streaming.runtime.metrics;
    +
    +import org.apache.flink.streaming.api.operators.AbstractStreamOperator;
    +import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
    +import org.apache.flink.streaming.api.operators.TwoInputStreamOperator;
    +import org.apache.flink.streaming.api.watermark.Watermark;
    +import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
    +import org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness;
    +import org.apache.flink.streaming.util.TwoInputStreamOperatorTestHarness;
    +
    +import org.junit.Assert;
    +import org.junit.Test;
    +
    +/**
    + * Tests to verify that {@link AbstractStreamOperator} properly updates the {@link WatermarkGauge}.
    + */
    +public class StreamOperatorWatermarkMetricsTest {
    +
    +	@Test
    +	public void testOneInputWatermarkReporting() throws Exception {
    --- End diff --
    
    Probably should add verifying the gauge value after processing the `Long.MAX_VALUE` watermark
to this test, just to be on the safe side.


---

Mime
View raw message