test: add simple OpenCypher query test to RemoteDatabaseQueriesTest#3208
test: add simple OpenCypher query test to RemoteDatabaseQueriesTest#3208
Conversation
Summary of ChangesHello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new end-to-end test case to ensure the correct functionality of OpenCypher queries within the remote database environment. This addition enhances test coverage for the query language integration, specifically verifying that simple Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 CI InsightsHere's what we observed from your CI run for ad95408. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Code Review
The pull request introduces a new test case for OpenCypher queries, which is a valuable addition to the test suite. The new test simpleOpenCypherQuery correctly verifies the execution of an OpenCypher query and the number of returned results. However, there is an opportunity to improve maintainability by addressing code duplication between this new test and the existing simpleCypherQuery.
| @Test | ||
| void simpleOpenCypherQuery() { | ||
| database.transaction(() -> { | ||
| final ResultSet result = database.query("opencypher", "MATCH(p:Beer) RETURN * LIMIT 10"); | ||
| assertThat(CollectionUtils.countEntries(result)).isEqualTo(10); | ||
| }, false, 10); |
There was a problem hiding this comment.
The simpleOpenCypherQuery method is nearly identical to simpleCypherQuery, with the primary difference being the query language used. This introduces code duplication. Consider refactoring these similar test cases into a single parameterized test or a common helper method to enhance maintainability and reduce redundancy. This approach would make it easier to manage and extend query language tests in the future.
There was a problem hiding this comment.
The
simpleOpenCypherQuerymethod is nearly identical tosimpleCypherQuery, with the primary difference being the query language used. This introduces code duplication. Consider refactoring these similar test cases into a single parameterized test or a common helper method to enhance maintainability and reduce redundancy. This approach would make it easier to manage and extend query language tests in the future.
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesFootnotes
|
…from 3.5.4 to 3.5.5 [skip ci] Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.4 to 3.5.5. Release notes *Sourced from [org.apache.maven.plugins:maven-failsafe-plugin's releases](https://github.com/apache/maven-surefire/releases).* > 3.5.5 > ----- > > 🚀 New features and improvements > ------------------------------- > > * Replace runing external process and parsing output with simple ProcessHandle if available (Java9+) ([#3252](https://redirect.github.com/apache/maven-surefire/pull/3252)) [`@olamy`](https://github.com/olamy) > * Pass slf4j context to spawned thread ([#3241](https://redirect.github.com/apache/maven-surefire/pull/3241)) [`@scottrw93`](https://github.com/scottrw93) > * [[SUREFIRE-3239]](https://issues.apache.org/jira/browse/SUREFIRE-3239) - allow override of statistics file checksum ([#3247](https://redirect.github.com/apache/maven-surefire/pull/3247)) [`@XN137`](https://github.com/XN137) > * Reduce log level for skipped tests result to info ([#3232](https://redirect.github.com/apache/maven-surefire/pull/3232)) [`@strangelookingnerd`](https://github.com/strangelookingnerd) > > 🐛 Bug Fixes > ----------- > > * Use PowerShell instead of WMIC for detecting zombie process on Windows ([#3258](https://redirect.github.com/apache/maven-surefire/pull/3258)) [`@jbliznak`](https://github.com/jbliznak). Please note if you are using Windows with Java 8 and not PowerShell (you have options to: use Java 9+, install PowerShell or stay on Surefire 3.5.4) > * Properly work with test failures caused during beforeAll phase ([#3194](https://redirect.github.com/apache/maven-surefire/pull/3194)) [`@Frawless`](https://github.com/Frawless) > > 📝 Documentation updates > ----------------------- > > * Clarify how late placeholder replacement (@{...}) deals with ([#3208](https://redirect.github.com/apache/maven-surefire/pull/3208)) [`@kwin`](https://github.com/kwin) > > 👻 Maintenance > ------------- > > * Fix Jenkin badges in README ([#3254](https://redirect.github.com/apache/maven-surefire/pull/3254)) [`@slawekjaranowski`](https://github.com/slawekjaranowski) > * Use JUnit5 in failsafe ITs ([#3251](https://redirect.github.com/apache/maven-surefire/pull/3251)) [`@slawekjaranowski`](https://github.com/slawekjaranowski) > * Remove long-deprecated unused encoding property from VerifyMojo ([#3198](https://redirect.github.com/apache/maven-surefire/pull/3198)) [`@Tomlincoln`](https://github.com/Tomlincoln) > * Add IT and deal with corner cases of handling beforeAll failures ([#3200](https://redirect.github.com/apache/maven-surefire/pull/3200)) [`@Frawless`](https://github.com/Frawless) > * Revert PR [#3194](https://redirect.github.com/apache/maven-surefire/issues/3194) that handle beforeAll failures to follow proper contributing rules ([#3211](https://redirect.github.com/apache/maven-surefire/pull/3211)) [`@Frawless`](https://github.com/Frawless) > > 🔧 Build > ------- > > * Missing many files in the GH Artifacts of CI ex-post. ([#3219](https://redirect.github.com/apache/maven-surefire/pull/3219)) [`@Tibor17`](https://github.com/Tibor17) > > 📦 Dependency updates > -------------------- > > * Bump org.xmlunit:xmlunit-core from 2.10.4 to 2.11.0 ([#3209](https://redirect.github.com/apache/maven-surefire/pull/3209)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness from 3.4.0 to 3.5.1 ([#3260](https://redirect.github.com/apache/maven-surefire/pull/3260)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump parent from 44 to 47 ([#3253](https://redirect.github.com/apache/maven-surefire/pull/3253)) [`@slawekjaranowski`](https://github.com/slawekjaranowski) > * Bump org.assertj:assertj-core from 3.16.1 to 3.27.7 in /surefire-its/src/test/resources/surefire-1733-testng ([#3246](https://redirect.github.com/apache/maven-surefire/pull/3246)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.assertj:assertj-core from 3.27.6 to 3.27.7 ([#3245](https://redirect.github.com/apache/maven-surefire/pull/3245)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.mojo:animal-sniffer-maven-plugin from 1.26 to 1.27 ([#3243](https://redirect.github.com/apache/maven-surefire/pull/3243)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.20.0 to 4.21.0 ([#3236](https://redirect.github.com/apache/maven-surefire/pull/3236)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-java from 1.5.1 to 1.5.2 ([#3235](https://redirect.github.com/apache/maven-surefire/pull/3235)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.logging.log4j:log4j-core from 2.17.1 to 2.25.3 in /surefire-its/src/test/resources/surefire-1659-stream-corruption ([#3234](https://redirect.github.com/apache/maven-surefire/pull/3234)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.19.0 to 4.20.0 ([#3228](https://redirect.github.com/apache/maven-surefire/pull/3228)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.18.0 to 4.19.0 ([#3224](https://redirect.github.com/apache/maven-surefire/pull/3224)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0 ([#3223](https://redirect.github.com/apache/maven-surefire/pull/3223)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-interpolation from 1.28 to 1.29 ([#3221](https://redirect.github.com/apache/maven-surefire/pull/3221)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-i18n from 1.0.0 to 1.1.0 ([#3220](https://redirect.github.com/apache/maven-surefire/pull/3220)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump commons-io:commons-io from 2.20.0 to 2.21.0 ([#3217](https://redirect.github.com/apache/maven-surefire/pull/3217)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness from 3.3.0 to 3.4.0 ([#3214](https://redirect.github.com/apache/maven-surefire/pull/3214)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-java from 1.5.0 to 1.5.1 ([#3218](https://redirect.github.com/apache/maven-surefire/pull/3218)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.16.0 to 4.18.0 ([#3213](https://redirect.github.com/apache/maven-surefire/pull/3213)) @[dependabot[bot]](https://github.com/apps/dependabot) ... (truncated) Commits * [`968cb38`](apache/maven-surefire@968cb38) [maven-release-plugin] prepare release surefire-3.5.5 * [`8e7dc41`](apache/maven-surefire@8e7dc41) Reapply "Replace runing external process and parsing output with simple Proce... * [`4ced57c`](apache/maven-surefire@4ced57c) Revert "Replace runing external process and parsing output with simple Proces…" * [`8496d9a`](apache/maven-surefire@8496d9a) Bump org.xmlunit:xmlunit-core from 2.10.4 to 2.11.0 ([#3209](https://redirect.github.com/apache/maven-surefire/issues/3209)) * [`68265e5`](apache/maven-surefire@68265e5) Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness ([#3260](https://redirect.github.com/apache/maven-surefire/issues/3260)) * [`0b19014`](apache/maven-surefire@0b19014) Replace runing external process and parsing output with simple ProcessHandle ... * [`688f8c4`](apache/maven-surefire@688f8c4) Use PowerShell instead of WMIC for detecting zombie process on Windows ([#3258](https://redirect.github.com/apache/maven-surefire/issues/3258)) * [`e5c01a6`](apache/maven-surefire@e5c01a6) Build only by the latest Maven on Jenkins ([#3255](https://redirect.github.com/apache/maven-surefire/issues/3255)) * [`9c99e97`](apache/maven-surefire@9c99e97) Fix Jenkin badges in README ([#3254](https://redirect.github.com/apache/maven-surefire/issues/3254)) * [`20930ea`](apache/maven-surefire@20930ea) Bump parent from 44 to 47 ([#3253](https://redirect.github.com/apache/maven-surefire/issues/3253)) * Additional commits viewable in [compare view](apache/maven-surefire@surefire-3.5.4...surefire-3.5.5) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
…from 3.5.4 to 3.5.5 [skip ci] Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.4 to 3.5.5. Release notes *Sourced from [org.apache.maven.plugins:maven-surefire-plugin's releases](https://github.com/apache/maven-surefire/releases).* > 3.5.5 > ----- > > 🚀 New features and improvements > ------------------------------- > > * Replace runing external process and parsing output with simple ProcessHandle if available (Java9+) ([#3252](https://redirect.github.com/apache/maven-surefire/pull/3252)) [`@olamy`](https://github.com/olamy) > * Pass slf4j context to spawned thread ([#3241](https://redirect.github.com/apache/maven-surefire/pull/3241)) [`@scottrw93`](https://github.com/scottrw93) > * [[SUREFIRE-3239]](https://issues.apache.org/jira/browse/SUREFIRE-3239) - allow override of statistics file checksum ([#3247](https://redirect.github.com/apache/maven-surefire/pull/3247)) [`@XN137`](https://github.com/XN137) > * Reduce log level for skipped tests result to info ([#3232](https://redirect.github.com/apache/maven-surefire/pull/3232)) [`@strangelookingnerd`](https://github.com/strangelookingnerd) > > 🐛 Bug Fixes > ----------- > > * Use PowerShell instead of WMIC for detecting zombie process on Windows ([#3258](https://redirect.github.com/apache/maven-surefire/pull/3258)) [`@jbliznak`](https://github.com/jbliznak). Please note if you are using Windows with Java 8 and not PowerShell (you have options to: use Java 9+, install PowerShell or stay on Surefire 3.5.4) > * Properly work with test failures caused during beforeAll phase ([#3194](https://redirect.github.com/apache/maven-surefire/pull/3194)) [`@Frawless`](https://github.com/Frawless) > > 📝 Documentation updates > ----------------------- > > * Clarify how late placeholder replacement (@{...}) deals with ([#3208](https://redirect.github.com/apache/maven-surefire/pull/3208)) [`@kwin`](https://github.com/kwin) > > 👻 Maintenance > ------------- > > * Fix Jenkin badges in README ([#3254](https://redirect.github.com/apache/maven-surefire/pull/3254)) [`@slawekjaranowski`](https://github.com/slawekjaranowski) > * Use JUnit5 in failsafe ITs ([#3251](https://redirect.github.com/apache/maven-surefire/pull/3251)) [`@slawekjaranowski`](https://github.com/slawekjaranowski) > * Remove long-deprecated unused encoding property from VerifyMojo ([#3198](https://redirect.github.com/apache/maven-surefire/pull/3198)) [`@Tomlincoln`](https://github.com/Tomlincoln) > * Add IT and deal with corner cases of handling beforeAll failures ([#3200](https://redirect.github.com/apache/maven-surefire/pull/3200)) [`@Frawless`](https://github.com/Frawless) > * Revert PR [#3194](https://redirect.github.com/apache/maven-surefire/issues/3194) that handle beforeAll failures to follow proper contributing rules ([#3211](https://redirect.github.com/apache/maven-surefire/pull/3211)) [`@Frawless`](https://github.com/Frawless) > > 🔧 Build > ------- > > * Missing many files in the GH Artifacts of CI ex-post. ([#3219](https://redirect.github.com/apache/maven-surefire/pull/3219)) [`@Tibor17`](https://github.com/Tibor17) > > 📦 Dependency updates > -------------------- > > * Bump org.xmlunit:xmlunit-core from 2.10.4 to 2.11.0 ([#3209](https://redirect.github.com/apache/maven-surefire/pull/3209)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness from 3.4.0 to 3.5.1 ([#3260](https://redirect.github.com/apache/maven-surefire/pull/3260)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump parent from 44 to 47 ([#3253](https://redirect.github.com/apache/maven-surefire/pull/3253)) [`@slawekjaranowski`](https://github.com/slawekjaranowski) > * Bump org.assertj:assertj-core from 3.16.1 to 3.27.7 in /surefire-its/src/test/resources/surefire-1733-testng ([#3246](https://redirect.github.com/apache/maven-surefire/pull/3246)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.assertj:assertj-core from 3.27.6 to 3.27.7 ([#3245](https://redirect.github.com/apache/maven-surefire/pull/3245)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.mojo:animal-sniffer-maven-plugin from 1.26 to 1.27 ([#3243](https://redirect.github.com/apache/maven-surefire/pull/3243)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.20.0 to 4.21.0 ([#3236](https://redirect.github.com/apache/maven-surefire/pull/3236)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-java from 1.5.1 to 1.5.2 ([#3235](https://redirect.github.com/apache/maven-surefire/pull/3235)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.logging.log4j:log4j-core from 2.17.1 to 2.25.3 in /surefire-its/src/test/resources/surefire-1659-stream-corruption ([#3234](https://redirect.github.com/apache/maven-surefire/pull/3234)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.19.0 to 4.20.0 ([#3228](https://redirect.github.com/apache/maven-surefire/pull/3228)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.18.0 to 4.19.0 ([#3224](https://redirect.github.com/apache/maven-surefire/pull/3224)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0 ([#3223](https://redirect.github.com/apache/maven-surefire/pull/3223)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-interpolation from 1.28 to 1.29 ([#3221](https://redirect.github.com/apache/maven-surefire/pull/3221)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-i18n from 1.0.0 to 1.1.0 ([#3220](https://redirect.github.com/apache/maven-surefire/pull/3220)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump commons-io:commons-io from 2.20.0 to 2.21.0 ([#3217](https://redirect.github.com/apache/maven-surefire/pull/3217)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness from 3.3.0 to 3.4.0 ([#3214](https://redirect.github.com/apache/maven-surefire/pull/3214)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.codehaus.plexus:plexus-java from 1.5.0 to 1.5.1 ([#3218](https://redirect.github.com/apache/maven-surefire/pull/3218)) @[dependabot[bot]](https://github.com/apps/dependabot) > * Bump org.htmlunit:htmlunit from 4.16.0 to 4.18.0 ([#3213](https://redirect.github.com/apache/maven-surefire/pull/3213)) @[dependabot[bot]](https://github.com/apps/dependabot) ... (truncated) Commits * [`968cb38`](apache/maven-surefire@968cb38) [maven-release-plugin] prepare release surefire-3.5.5 * [`8e7dc41`](apache/maven-surefire@8e7dc41) Reapply "Replace runing external process and parsing output with simple Proce... * [`4ced57c`](apache/maven-surefire@4ced57c) Revert "Replace runing external process and parsing output with simple Proces…" * [`8496d9a`](apache/maven-surefire@8496d9a) Bump org.xmlunit:xmlunit-core from 2.10.4 to 2.11.0 ([#3209](https://redirect.github.com/apache/maven-surefire/issues/3209)) * [`68265e5`](apache/maven-surefire@68265e5) Bump org.apache.maven.plugin-testing:maven-plugin-testing-harness ([#3260](https://redirect.github.com/apache/maven-surefire/issues/3260)) * [`0b19014`](apache/maven-surefire@0b19014) Replace runing external process and parsing output with simple ProcessHandle ... * [`688f8c4`](apache/maven-surefire@688f8c4) Use PowerShell instead of WMIC for detecting zombie process on Windows ([#3258](https://redirect.github.com/apache/maven-surefire/issues/3258)) * [`e5c01a6`](apache/maven-surefire@e5c01a6) Build only by the latest Maven on Jenkins ([#3255](https://redirect.github.com/apache/maven-surefire/issues/3255)) * [`9c99e97`](apache/maven-surefire@9c99e97) Fix Jenkin badges in README ([#3254](https://redirect.github.com/apache/maven-surefire/issues/3254)) * [`20930ea`](apache/maven-surefire@20930ea) Bump parent from 44 to 47 ([#3253](https://redirect.github.com/apache/maven-surefire/issues/3253)) * Additional commits viewable in [compare view](apache/maven-surefire@surefire-3.5.4...surefire-3.5.5) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
No description provided.