You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/11/22 18:15:00 UTC

[jira] [Commented] (NIFI-10835) Improve Performance of TestControlRate

    [ https://issues.apache.org/jira/browse/NIFI-10835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17637399#comment-17637399 ] 

ASF subversion and git services commented on NIFI-10835:
--------------------------------------------------------

Commit 7019e182b5b0e36cc46ad37456f435b2a84269d5 in nifi's branch refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=7019e182b5 ]

NIFI-10835 Improved performance of TestControlRate

- Added LongSupplier for TimedBuffer and ControlRate classes to support overriding System.currentTimeMillis()

This closes #6671
Signed-off-by: Paul Grey <gr...@apache.org>


> Improve Performance of TestControlRate
> --------------------------------------
>
>                 Key: NIFI-10835
>                 URL: https://issues.apache.org/jira/browse/NIFI-10835
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions, Tools and Build
>            Reporter: David Handermann
>            Assignee: David Handermann
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The {{TestControlRate}} class takes over 12 seconds to run due to the use of Thread.sleep() across multiple test methods.
> The test class can be improved by implementing a method to override the current time. The default implementation should maintain the current behavior of returning {{System.currentTimeMillis()}} but the extended test class can override the implementation to increment current time, allowing the processor logic to function as designed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)