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

David Handermann commented on NIFI-8465:
----------------------------------------

Thanks for tracking down the source of the problem [~pgrey]!  We definitely 
avoid test failures, so one of the last three options should be the way to go.  
Option 2 is not great, but better than Option 1.  Reviewing the current 
{{PasswordBasedEncryptor}} implementation, there appears to be room for 
improvement, but the current process method is part of the StreamCallback 
interface.  For Option 4, is this something that would be used only in the unit 
test?  If so, it seems better to go with Option 2 and just remove the test 
method.  Perhaps more substantial refactoring is in order if the behavior 
should be maintained, but given the nature of the current implementation, it 
seems better to go with Option 2 and consider revisiting the EncryptContent 
processor more generally.

> Correct intermittent failures in PasswordBasedEncryptorGroovyTest
> -----------------------------------------------------------------
>
>                 Key: NIFI-8465
>                 URL: https://issues.apache.org/jira/browse/NIFI-8465
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: David Handermann
>            Assignee: Paul Grey
>            Priority: Minor
>              Labels: encryption, security
>
> {{PasswordBasedEncryptorGroovyTest}} can fail intermittently during automated 
> builds.  A recent failure occurred when comparing encrypted and plaintext 
> results:
> {quote}Error:  Failures: 
> Error:    
> PasswordBasedEncryptorGroovyTest.testBcryptDecryptShouldSupportLegacyKeyDerivationProcess:445
>  assert recovered == PLAINTEXT{quote}
> The test class should be evaluated to determine the source of the problem and 
> refactored to avoid potential failures.  It is also worth evaluating the 
> opportunity to refactor the test into more discrete test classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to