Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-11319 Fixing TestStatelessBootstrap::testClassNotAllowed #7070

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

simonbence
Copy link
Contributor

@simonbence simonbence commented Mar 22, 2023

The test was broken. My understaning is that the test supposed to ensure that classes from outside the allowed NAR directory should not be loaded expect if they are part of a spefic set of classes (java or jdk "modules"). The original configuration of the test used the "target" folder as NAR folder, which contained every product of the build, including the class "org.apache.nifi.stateless.bootstrap.RunStatelessFlow" used as test subject, thus the class was loaded and the test broke. I narrowed down the "nar folder" in order to not have the test subject included, this I would believe solves the issue.

NIFI-11319

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@markap14 markap14 merged commit f062b0d into apache:main Mar 22, 2023
@markap14
Copy link
Contributor

Thanks @simonbence that does appear to address the issue. Interestingly, I didn't encounter it when running mvn clean install because all of the directories under target hadn't yet been completed when that runs. But if you run in the IDE after building or run via mvn test after the build has completed, it failed. +1 merged to main and support branches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants