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/08/05 14:45:00 UTC

[jira] [Commented] (NIFI-10302) Intermittent Failures in TestMonitorActivity

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

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

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

NIFI-10302 Streamlined TestMonitorActivity to improve reliability

- Removed TestRunner.run() loops
- Reduced usage of Thread.sleep()
- Upgraded TestMonitorActivity to JUnit 5

Signed-off-by: Joe Gresock <jg...@gmail.com>
This closes #6261.


> Intermittent Failures in TestMonitorActivity
> --------------------------------------------
>
>                 Key: NIFI-10302
>                 URL: https://issues.apache.org/jira/browse/NIFI-10302
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Tools and Build
>            Reporter: David Handermann
>            Assignee: David Handermann
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The {{TestMonitorActivity}} class has several methods that could result in intermittent failures, particularly on resource-constrained environments such as GitHub Actions.
> Multiple methods include calls to {{Thread.sleep()}}, which may not allow enough time to complete operations in some cases. These methods should be evaluated to improve test reliability.
> {noformat}
> Error:  org.apache.nifi.processors.standard.TestMonitorActivity.testFirstMessageWithInherit  Time elapsed: 5.79 s  <<< FAILURE!
> org.opentest4j.AssertionFailedError: expected: <10> but was: <9>
> 	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
> 	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
> 	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
> 	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
> 	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:527)
> 	at org.apache.nifi.util.StandardProcessorTestRunner.assertTransferCount(StandardProcessorTestRunner.java:360)
> 	at org.apache.nifi.processors.standard.TestMonitorActivity.testFirstMessageWithInherit(TestMonitorActivity.java:376)
> {noformat}



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