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

ASF GitHub Bot commented on NIFI-1668:
--------------------------------------

Github user JPercivall commented on the pull request:

    https://github.com/apache/nifi/pull/324#issuecomment-221901178
  
    How will moving the building of the flow controller to the before method 
help the OverlappingFileLockException? The before and after methods are run 
immediately before and immediately after each test, so they will get executed 
at almost the same time as before this change. The test is failing when it's 
creating the state provider, which is not being used. Why not just mock it so 
that the state provider doesn't attempt to grab a lock on the File System? 
    
    This PR should also address the 
validateIdempotencyOfProcessorStartOperation method which fails many times too 
but in a different fashion:
    
    Tests run: 16, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 40.952 sec 
<<< FAILURE! - in org.apache.nifi.controller.scheduling.TestProcessorLifecycle
    
validateIdempotencyOfProcessorStartOperation(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)
  Time elapsed: 0.162 sec  <<< FAILURE!
    java.lang.AssertionError: expected:<1> but was:<0>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:834)
        at org.junit.Assert.assertEquals(Assert.java:645)
        at org.junit.Assert.assertEquals(Assert.java:631)
        at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.validateIdempotencyOfProcessorStartOperation(TestProcessorLifecycle.java:178)


> Intermittent Test Failure for TestProcessorLifecycle
> ----------------------------------------------------
>
>                 Key: NIFI-1668
>                 URL: https://issues.apache.org/jira/browse/NIFI-1668
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Bryan Bende
>            Assignee: Oleg Zhurakousky
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> A build on Travis produced the errors below, but they are not seen frequently:
> validateProcessorCanBeStoppedWhenOnTriggerThrowsException on 
> validateProcessorCanBeStoppedWhenOnTriggerThrowsException(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)
>   Time elapsed: 0.085 sec  <<< FAILURE!
> java.nio.channels.OverlappingFileLockException: null
>       at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
>       at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
>       at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1043)
>       at java.nio.channels.FileChannel.lock(FileChannel.java:1052)
>       at 
> org.wali.MinimalLockingWriteAheadLog.<init>(MinimalLockingWriteAheadLog.java:179)
>       at 
> org.wali.MinimalLockingWriteAheadLog.<init>(MinimalLockingWriteAheadLog.java:108)
>       at 
> org.apache.nifi.controller.state.providers.local.WriteAheadLocalStateProvider.init(WriteAheadLocalStateProvider.java:97)
>       at 
> org.apache.nifi.controller.state.providers.AbstractStateProvider.initialize(AbstractStateProvider.java:34)
>       at 
> org.apache.nifi.controller.state.manager.StandardStateManagerProvider.createStateProvider(StandardStateManagerProvider.java:186)
>       at 
> org.apache.nifi.controller.state.manager.StandardStateManagerProvider.createLocalStateProvider(StandardStateManagerProvider.java:80)
>       at 
> org.apache.nifi.controller.state.manager.StandardStateManagerProvider.create(StandardStateManagerProvider.java:66)
>       at 
> org.apache.nifi.controller.FlowController.<init>(FlowController.java:435)
>       at 
> org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:366)
>       at 
> org.apache.nifi.controller.scheduling.TestProcessorLifecycle.buildFlowControllerForTest(TestProcessorLifecycle.java:642)
>       at 
> org.apache.nifi.controller.scheduling.TestProcessorLifecycle.validateProcessorCanBeStoppedWhenOnTriggerThrowsException(TestProcessorLifecycle.java:477)
> Results :
> Failed tests: 
>   
> TestProcessorLifecycle.validateDisableOperation:117->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateLifecycleOperationOrderWithConcurrentCallsToStartStop:254->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateProcessScheduledAfterAdministrativeDelayDueToTheOnScheduledException:347->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateProcessorCanBeStoppedWhenOnScheduledBlocksIndefinitelyInterruptable:413->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateProcessorCanBeStoppedWhenOnScheduledBlocksIndefinitelyUninterruptable:443->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateProcessorCanBeStoppedWhenOnScheduledConstantlyFails:380->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateProcessorCanBeStoppedWhenOnTriggerThrowsException:477->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateProcessorUnscheduledAndStoppedWhenStopIsCalledBeforeProcessorFullyStarted:311->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateStartSucceedsOnProcessorWithEnabledService:554->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   
> TestProcessorLifecycle.validateStopCallsAreMeaninglessIfProcessorNotStarted:187->buildFlowControllerForTest:642
>  » OverlappingFileLock
>   TestProcessorLifecycle.validateSuccessfullAndOrderlyShutdown:239 
> expected:<3> but was:<2>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to