flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chesnay Schepler <ches...@apache.org>
Subject Re: Writing an Integration test for flink-metrics
Date Thu, 12 Oct 2017 12:29:05 GMT
Well damn, i should've read the second part of the initial mail.

I'm wondering though, could you not unit-test this behavior?

On 12.10.2017 14:25, Chesnay Schepler wrote:
> You could also write a custom reporter that opens a socket or similar 
> for communication purposes.
> You can then either query it for the metrics, or even just trigger the 
> verification in the reporter,
> and fail with an error if the reporter returns an error.
> On 12.10.2017 14:02, Piotr Nowojski wrote:
>> Hi,
>> Doing as you proposed using JMXReporter (or custom reporter) should 
>> work. I think there is no easier way to do this at the moment.
>> Piotrek
>>> On 12 Oct 2017, at 04:58, Colin Williams 
>>> <colin.williams.seattle@gmail.com> wrote:
>>> I have a RichMapFunction and I'd like to ensure Meter fields are 
>>> properly incremented. I've been trying to think of the best way to 
>>> do this. Currently I think that I'd need to either implement my own 
>>> reporter (or use JMX) and write to a socket, create a listener and 
>>> wait for the reporter to send the message.
>>> Is this a good approach for writing the test, or should I be 
>>> considering something else?

View raw message