You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by alopresto <gi...@git.apache.org> on 2018/08/29 03:03:45 UTC
[GitHub] nifi issue #2972: NIFI-5558 Fixed unit test to avoid contamination from Syst...
Github user alopresto commented on the issue:
https://github.com/apache/nifi/pull/2972
The issue that was encountered by some users was that the previous mechanism for creating a test `NiFiProperties` instance was `NiFiProperties.createBasicNiFiProperties(String filePath, Map<String, String> additionalProperties)`. When provided a `null` file path, the code tried to use `System.getProperty("nifi.properties.file.path")` to locate the `nifi.properties` file. On my machine, the test code which was evaluating the _empty key_ scenario returned an empty `NiFiProperties` instance with only the overridden properties populated, but on other machines, this code was loading the properties from `src/test/resources/conf/nifi.properties` where the `nifi.sensitive.props.key=key`. Because of this, the two passwords were not equal, and the keys derived from them were different. When you attempt to decrypt data with the wrong key, a `pad block corrupted` error is common.
The tests still work for me in the following scenarios, so I need a user who encountered the error to validate that this fixes the issue on their system.
* via IntelliJ Run/Debug
* via IntelliJ Maven execution
* via command-line Maven execution
* specific test using `mvn clean test -Dtest=PopularVoteFlowElectionFactoryBeanTest`
* module using `.../nifi-framework-cluster $ mvn clean test`
* full build from root
* with JCE Unlimited Strength Jurisdiction Policies
* without JCE USJP
---