You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Andy LoPresto (JIRA)" <ji...@apache.org> on 2017/06/22 20:18:00 UTC

[jira] [Created] (NIFI-4110) Encrypted provenance repository test can fail due to timing

Andy LoPresto created NIFI-4110:
-----------------------------------

             Summary: 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


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)