[
https://issues.apache.org/jira/browse/NIFI-11559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17725462#comment-17725462
]
ASF subversion and git services commented on NIFI-11559:
--------------------------------------------------------
Commit ec01bce20786dfef0bd457fa7de8e04edbef9589 in nifi's branch
refs/heads/main from Simon Bence
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=ec01bce207 ]
NIFI-11559 Increased poll time in CollisionAwareResourceProviderWorkerTest
- Incremental adjustment avoids breaking test on slower environments
This closes #7260
Signed-off-by: David Handermann <[email protected]>
> Refinement on
> CollisionAwareResourceProviderWorkerTest#testRunWithPreExistingDirectory
> --------------------------------------------------------------------------------------
>
> Key: NIFI-11559
> URL: https://issues.apache.org/jira/browse/NIFI-11559
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Reporter: Simon Bence
> Assignee: Simon Bence
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> In automatic checks
> _CollisionAwareResourceProviderWorkerTest#testRunWithPreExistingDirectory_
> sometimes fails with the following error:
> {code:java}
> [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 1.389
> s <<< FAILURE! - in
> org.apache.nifi.flow.resource.CollisionAwareResourceProviderWorkerTest
> [ERROR]
> org.apache.nifi.flow.resource.CollisionAwareResourceProviderWorkerTest.testRunWithPreExistingDirectory
> Time elapsed: 0.256 s <<< FAILURE!
> org.opentest4j.AssertionFailedError: expected: <1> but was: <2>
> at
> org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
> at
> org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
> at
> org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
> 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:528)
> at
> org.apache.nifi.flow.resource.CollisionAwareResourceProviderWorkerTest.assertOperationsAreFinished(CollisionAwareResourceProviderWorkerTest.java:315)
> at
> org.apache.nifi.flow.resource.CollisionAwareResourceProviderWorkerTest.testRunWithPreExistingDirectory(CollisionAwareResourceProviderWorkerTest.java:104)
> {code}
> This means that the _ConflictResolvingExternalResourceProviderWorker#poll_ is
> being called twice during the test instead on one time. The _poll_ is called
> only within the worker loop thus the worker is not stopped within time. This
> can happen when the test's main thread is slower than expected and allows the
> loop to have one more iteration.
> As a solution, the loop's waiting time is increased. This new value still
> does not make the tests slow or perventing them from properly running but
> significantly lowers the chance of having an extra iteration thus breaking
> the test.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)