m-hogue commented on a change in pull request #3930: NIFI-6851: Added 
FlowFileAcquisitionMethod to fetch/receive methods i…
URL: https://github.com/apache/nifi/pull/3930#discussion_r357772561
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/groovy/org/apache/nifi/provenance/EncryptedSchemaRecordReaderWriterTest.groovy
 ##########
 @@ -273,10 +273,10 @@ class EncryptedSchemaRecordReaderWriterTest extends 
AbstractTestRecordReaderWrit
         RecordReader incompatibleReader = new 
EventIdFirstSchemaRecordReader(efis, encryptedJournalFile.getName(), 
incompatibleTocReader, MAX_ATTRIBUTE_SIZE)
         logger.info("Generated standard reader (attempting to read encrypted 
file): ${incompatibleReader}")
 
-        def msg = shouldFail(EOFException) {
+        def msg = shouldFail(IOException) {
             ProvenanceEventRecord encryptedEvent = 
incompatibleReader.nextRecord()
         }
         logger.expected(msg)
-        assert msg =~ "EOFException: Failed to read field"
+        assert msg =~ "IOException: Invalid Boolean value found when reading 
'Repetition' of field"
 
 Review comment:
   I spent some time trying to understand this unit test and what it was 
asserting: that standard provenance record readers can't read encrypted 
provenance events. 
   
   It seems that the proof that a standard record reader's inability to read 
encrypted events was just confirming that it choked when trying to deserialize 
the encrypted events. For example, the standard reader doesn't know an event is 
encrypted; it just chokes when it can't deserialize the event as it expects. As 
far as i can tell, since the serialization changed (e.g. the serialized event 
looks different), the reader chokes at a different spot. Hence the change in 
exception that's thrown. Does that make sense?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to