Skip to content

NIFI-11191 Refactored HikariCPConnectionPoolTest with Mock Driver#6966

Merged
kevdoran merged 1 commit intoapache:mainfrom
exceptionfactory:NIFI-11191
Feb 16, 2023
Merged

NIFI-11191 Refactored HikariCPConnectionPoolTest with Mock Driver#6966
kevdoran merged 1 commit intoapache:mainfrom
exceptionfactory:NIFI-11191

Conversation

@exceptionfactory
Copy link
Contributor

Summary

NIFI-11191 Refactors the HikariCPConnectionPoolTest class using a MockDriver class to avoid intermittent failures related to concurrency and file locking when using Apache Derby.

The existing test class attempted to work around locking issues using specialized temporary file handling for the Derby database and associated the logs. The MockDriver approach avoids these issues and focuses the test on confirming whether the Controller Service returns a Connection.

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

- Removed Derby dependencies from HikariCP module no longer required for testing
Copy link
Contributor

@kevdoran kevdoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, will merge once the last CI build completes

@kevdoran kevdoran merged commit 5507bfa into apache:main Feb 16, 2023
exceptionfactory added a commit that referenced this pull request Feb 17, 2023
)

- Removed Derby dependencies from HikariCP module no longer required for testing

Signed-off-by: Kevin Doran <kdoran@apache.org>
udaynpusa pushed a commit to mapr/nifi that referenced this pull request Apr 25, 2024
…ache#6966)

- Removed Derby dependencies from HikariCP module no longer required for testing

Signed-off-by: Kevin Doran <kdoran@apache.org>
(cherry picked from commit 5507bfa)
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