[
https://issues.apache.org/jira/browse/NIFI-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060056#comment-16060056
]
Pierre Villard commented on NIFI-4110:
--------------------------------------
Hey [~alopresto], over 100 executions of the test I've not been able to
reproduce the error. Obviously, the code LGTM, but can't say for sure it is
solving the original issue. Is there any specific OS that would cause this
issue? Let me know but in any case I don't see any objection to get this merged.
> Encrypted provenance repository test can fail due to timing
> -----------------------------------------------------------
>
> Key: NIFI-4110
> URL: https://issues.apache.org/jira/browse/NIFI-4110
> Project: Apache NiFi
> Issue Type: Bug
> Components: Tools and Build
> Affects Versions: 1.3.0
> Reporter: Andy LoPresto
> Assignee: Andy LoPresto
> Labels: provenance, test, timing
>
> There is an occasional failure in the unit tests for the
> {{EncryptedWriteAheadProvenanceRepository}} where the events retrieved (9)
> are less than the expected number (10) because it has not yet indexed the
> last event. Adding a {{Thread.sleep(1000)}} seems to resolve this
> consistently.
> {code}
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.apache.nifi.provenance.EncryptedSchemaRecordReaderWriterTest
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec -
> in org.apache.nifi.provenance.EncryptedSchemaRecordReaderWriterTest
> Running org.apache.nifi.provenance.EncryptedWriteAheadProvenanceRepositoryTest
> Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.161 sec <<<
> FAILURE! - in
> org.apache.nifi.provenance.EncryptedWriteAheadProvenanceRepositoryTest
> testWriteAheadProvenanceRepositoryShouldRegisterAndRetrieveEvents(org.apache.nifi.provenance.EncryptedWriteAheadProvenanceRepositoryTest)
> Time elapsed: 0.033 sec <<< FAILURE!
> org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert
> recoveredRecords.size() == RECORD_COUNT
> | | | |
> | 9 | 10
> | false
> [ProvenanceEventRecord [eventId=0, eventType=RECEIVE, eventTime=Thu
> Jun 22 11:09:07 EDT 2017, uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f,
> fileSize=0, componentId=1234, transitUri=nifi://unit-test,
> sourceSystemFlowFileIdentifier=null, parentUuids=[],
> alternateIdentifierUri=null], ProvenanceEventRecord [eventId=1,
> eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=2, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=3, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=4, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=5, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=6, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=7, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null], ProvenanceEventRecord
> [eventId=9, eventType=RECEIVE, eventTime=Thu Jun 22 11:09:07 EDT 2017,
> uuid=2c2f9e5e-ebda-4ac1-a954-4b1d0d9ddd1f, fileSize=0, componentId=1234,
> transitUri=nifi://unit-test, sourceSystemFlowFileIdentifier=null,
> parentUuids=[], alternateIdentifierUri=null]]
> at
> org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:402)
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:650)
> at
> org.apache.nifi.provenance.EncryptedWriteAheadProvenanceRepositoryTest.testWriteAheadProvenanceRepositoryShouldRegisterAndRetrieveEvents(EncryptedWriteAheadProvenanceRepositoryTest.groovy:237)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)