NIFI-16202 Removed Mockito warning that appeared when running the nifi build. - #11545
NIFI-16202 Removed Mockito warning that appeared when running the nifi build.#11545dan-s1 wants to merge 12 commits into
Conversation
|
@exceptionfactory Do you know why I may be seeing the following errors on the MacOS and on the Windows box ? I do not think the changes I made should have any bearing on these unit tests. Please advise. Thanks! |
That is a smoke test to ensure locale settings are being based as expected. It points to a missing configuration element in the new plugin definitions. |
|
Was this caused by my changes? Is there something I need to do? If so what is it? |
Yes, I recommend taking a closer look at the Java arguments to make sure they are being passed as expected |
|
Where are you referring to? My changes I believe changed an |
Yes, see the build.yml workflow that provides an external |
|
@exceptionfactory I finally solved this by moving the definition of |
|
@dan-s1 I haven't had the opportunity to evaluate the best solution, but the |
…t overriding arguments passed via the command line.
…ere is no value for argLine.
…Java Agent in its own property.
…m breaking redefined the setting of them in Surefire fork argLine.
…ing of them in argLine. Rather referenced the properties defined in the CI/CD in the surefire systemPropertyVariables property.
…st environment and preserved the incoming command line with @{argLine} syntax.
…nvironment variable NIFI_CI_LOCALE through MAVEN_OPTS.
…refire via command-line argLine.
…o treat as a single argument string.
Summary
NIFI-16202
Without the changes in this PR one can see running
grep -r -i "Mockito is currently" --include="*output.txt" .from the build directory after running the build will result in many hits e.g.
./nifi-commons/nifi-security-ssl/target/surefire-reports/org.apache.nifi.security.ssl.EphemeralKeyStoreBuilderTest-output.txt:Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3but after running the build with this PR the above grep command will result in nothing. In addition, the Mockito message will not be seen when running any of these tests in Intellij.
The changes in this PR involved the follow changes in the top level pom.xml:
maven-dependency-pluginin its ownexecutionblockexecutionblock in themaven-dependency-pluginin order to copy the mockito-core library to the target directory.argLineto themaven-surefire-pluginto configure mockito-core as a Java Agent to enable explicit attachment to processes.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation