GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — test: add unit tests for OpenCypher functions and Bolt chunked I/O by robfrank · Pull Request #3352 · ArcadeData/arcadedb Conversation
Collaborator
Add 150 new unit tests to improve test coverage for: OpenCypher functions (133 tests):
Bolt protocol (17 tests):
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAdd 150 new unit tests to improve test coverage for: OpenCypher functions (133 tests): - Text functions: indexOf, split, join, capitalize, levenshtein, etc. - Math functions: sigmoid, tanh, cosh, sinh, maxLong, etc. - Convert functions: toInteger, toFloat, toBoolean, toJson, etc. - Date functions: currentTimestamp, format, field, fields, add, etc. - Util functions: md5, sha1, sha256, sha512 Bolt protocol (17 tests): - BoltChunkedInput and BoltChunkedOutput classes - Empty, small, and large message handling (>64KB) - Round-trip serialization verification Co-Authored-By: Claude Opus 4.5 <[email protected]>
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code ReviewThis pull request significantly improves test coverage by adding a large number of unit tests for OpenCypher functions and Bolt protocol I/O, as outlined in the new design document. The tests are well-structured and cover a wide range of scenarios, including edge cases, null handling, and round-trip serialization. I've added a couple of minor suggestions to improve the maintainability and style of the assertions in the tests. Overall, this is an excellent contribution to the project's test suite.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. - Replace magic number 65534 with message.length - 1 for better readability - Use containsEntry() instead of get().isEqualTo() for consistency Co-Authored-By: Claude Opus 4.5 <[email protected]>
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
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 preferences |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
🧪 CI InsightsHere's what we observed from your CI run for daf3eb1. 🟢 All jobs passed!But CI Insights is watching 👀 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #3352 +/- ## ========================================== + Coverage 56.57% 57.05% +0.47% ========================================== Files 1368 1368 Lines 100620 100624 +4 Branches 20490 20490 ========================================== + Hits 56922 57407 +485 + Misses 34572 34115 -457 + Partials 9126 9102 -24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add 58 unit tests covering: - DatabaseBackupConfig creation and JSON parsing - ScheduleConfig (FREQUENCY and CRON types, time windows, validation) - RetentionConfig (maxFiles, tiered retention) - TieredConfig (hourly, daily, weekly, monthly, yearly counts) - JSON serialization/deserialization round-trips - Merge with defaults behavior - Validation error cases Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add getCode(), getResponse(), getBinary(), and isBinary() getters to ExecutionResponse class for testability - Create ExecutionResponseTest with 10 unit tests covering: - String and binary response construction - Various HTTP status codes (200, 201, 204, 400, 500) - Empty string and binary responses - Large payloads (100KB) - JSON response handling - Null string responses - Binary byte preservation Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tests cover: - Initial state verification (not running, zero scheduled) - Start/stop lifecycle management - Frequency-based backup scheduling - CRON-based backup scheduling - Multiple database handling - Cancel operations - Rescheduling (replacement behavior) - Disabled config handling - Invalid CRON expression handling - Immediate backup triggering Co-Authored-By: Claude Opus 4.5 <[email protected]>
Plan for adding ~55 unit tests across 3 test files: - DatabaseBackupConfigTest (configuration parsing, validation) - ExecutionResponseTest (HTTP response construction) - BackupSchedulerTest (scheduler lifecycle) Co-Authored-By: Claude Opus 4.5 <[email protected]>
PR Review: Test Coverage ImprovementSummaryThis PR adds ~240 unit tests across multiple modules to significantly improve test coverage. The implementation is well-structured, follows best practices, and aligns with the project's test coverage goals documented in the planning documents. Overall Assessment: ✅ ApprovedThis is an excellent contribution that meaningfully improves test coverage without modifying production code behavior (except for adding necessary getters to ExecutionResponse for testability). Detailed Review✅ Code QualityStrengths:
Suggestions for improvement:
✅ Test CoverageAdded tests:
Total: ~240 tests ✅ All tests appear to be properly isolated unit tests that don't require full database setup, which is excellent for fast execution. ✅ Potential Bugs or IssuesNo critical issues found. Minor observations:
✅ Performance ConsiderationsWell optimized:
Suggestion:
✅ Security ConcernsNo security issues identified:
✅ Alignment with CLAUDE.mdExcellent adherence to project guidelines:
📋 Additional Notes
Recommendation: ✅ APPROVEDThis PR significantly improves test coverage with high-quality, well-structured tests. The code follows project conventions, includes appropriate edge cases, and should help catch regressions. No blocking issues identified. Suggested actions before merge:
Great work on this comprehensive test coverage improvement! 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…d server (#3352) * test: add unit tests for OpenCypher functions and Bolt chunked I/O Add 150 new unit tests to improve test coverage for: OpenCypher functions (133 tests): - Text functions: indexOf, split, join, capitalize, levenshtein, etc. - Math functions: sigmoid, tanh, cosh, sinh, maxLong, etc. - Convert functions: toInteger, toFloat, toBoolean, toJson, etc. - Date functions: currentTimestamp, format, field, fields, add, etc. - Util functions: md5, sha1, sha256, sha512 Bolt protocol (17 tests): - BoltChunkedInput and BoltChunkedOutput classes - Empty, small, and large message handling (>64KB) - Round-trip serialization verification - Replace magic number 65534 with message.length - 1 for better readability - Use containsEntry() instead of get().isEqualTo() for consistency * test: add comprehensive unit tests for DatabaseBackupConfig Add 58 unit tests covering: - DatabaseBackupConfig creation and JSON parsing - ScheduleConfig (FREQUENCY and CRON types, time windows, validation) - RetentionConfig (maxFiles, tiered retention) - TieredConfig (hourly, daily, weekly, monthly, yearly counts) - JSON serialization/deserialization round-trips - Merge with defaults behavior - Validation error cases * test: add unit tests for ExecutionResponse with accessor methods - Add getCode(), getResponse(), getBinary(), and isBinary() getters to ExecutionResponse class for testability - Create ExecutionResponseTest with 10 unit tests covering: - String and binary response construction - Various HTTP status codes (200, 201, 204, 400, 500) - Empty string and binary responses - Large payloads (100KB) - JSON response handling - Null string responses - Binary byte preservation * Add BackupSchedulerTest with 16 unit tests for scheduler lifecycle Tests cover: - Initial state verification (not running, zero scheduled) - Start/stop lifecycle management - Frequency-based backup scheduling - CRON-based backup scheduling - Multiple database handling - Cancel operations - Rescheduling (replacement behavior) - Disabled config handling - Invalid CRON expression handling - Immediate backup triggering * docs: add server module test coverage implementation plan Plan for adding ~55 unit tests across 3 test files: - DatabaseBackupConfigTest (configuration parsing, validation) - ExecutionResponseTest (HTTP response construction) - BackupSchedulerTest (scheduler lifecycle) (cherry picked from commit d6cbc10)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.8 to 4.31.9. Release notes *Sourced from [github/codeql-action's releases](https://github.com/github/codeql-action/releases).* > v4.31.9 > ------- > > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > 4.31.9 - 16 Dec 2025 > -------------------- > > No user facing changes. > > See the full [CHANGELOG.md](https://github.com/github/codeql-action/blob/v4.31.9/CHANGELOG.md) for more information. Changelog *Sourced from [github/codeql-action's changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md).* > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > [UNRELEASED] > ------------ > > No user facing changes. > > 4.31.9 - 16 Dec 2025 > -------------------- > > No user facing changes. > > 4.31.8 - 11 Dec 2025 > -------------------- > > * Update default CodeQL bundle version to 2.23.8. [ArcadeData#3354](https://redirect.github.com/github/codeql-action/pull/3354) > > 4.31.7 - 05 Dec 2025 > -------------------- > > * Update default CodeQL bundle version to 2.23.7. [ArcadeData#3343](https://redirect.github.com/github/codeql-action/pull/3343) > > 4.31.6 - 01 Dec 2025 > -------------------- > > No user facing changes. > > 4.31.5 - 24 Nov 2025 > -------------------- > > * Update default CodeQL bundle version to 2.23.6. [ArcadeData#3321](https://redirect.github.com/github/codeql-action/pull/3321) > > 4.31.4 - 18 Nov 2025 > -------------------- > > No user facing changes. > > 4.31.3 - 13 Nov 2025 > -------------------- > > * CodeQL Action v3 will be deprecated in December 2026. The Action now logs a warning for customers who are running v3 but could be running v4. For more information, see [Upcoming deprecation of CodeQL Action v3](https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/). > * Update default CodeQL bundle version to 2.23.5. [ArcadeData#3288](https://redirect.github.com/github/codeql-action/pull/3288) > > 4.31.2 - 30 Oct 2025 > -------------------- > > No user facing changes. > > 4.31.1 - 30 Oct 2025 > -------------------- > > * The `add-snippets` input has been removed from the `analyze` action. This input has been deprecated since CodeQL Action 3.26.4 in August 2024 when this removal was announced. > > 4.31.0 - 24 Oct 2025 > -------------------- > > * Bump minimum CodeQL bundle version to 2.17.6. [ArcadeData#3223](https://redirect.github.com/github/codeql-action/pull/3223) > * When SARIF files are uploaded by the `analyze` or `upload-sarif` actions, the CodeQL Action automatically performs post-processing steps to prepare the data for the upload. Previously, these post-processing steps were only performed before an upload took place. We are now changing this so that the post-processing steps will always be performed, even when the SARIF files are not uploaded. This does not change anything for the `upload-sarif` action. For `analyze`, this may affect Advanced Setup for CodeQL users who specify a value other than `always` for the `upload` input. [ArcadeData#3222](https://redirect.github.com/github/codeql-action/pull/3222) ... (truncated) Commits * [`5d4e8d1`](github/codeql-action@5d4e8d1) Merge pull request [ArcadeData#3371](https://redirect.github.com/github/codeql-action/issues/3371) from github/update-v4.31.9-998798e34 * [`1dc115f`](github/codeql-action@1dc115f) Update changelog for v4.31.9 * [`998798e`](github/codeql-action@998798e) Merge pull request [ArcadeData#3352](https://redirect.github.com/github/codeql-action/issues/3352) from github/nickrolfe/jar-min-ff-cleanup * [`5eb7519`](github/codeql-action@5eb7519) Merge pull request [ArcadeData#3358](https://redirect.github.com/github/codeql-action/issues/3358) from github/henrymercer/database-upload-telemetry * [`d29eddb`](github/codeql-action@d29eddb) Extract version number to constant * [`e962687`](github/codeql-action@e962687) Merge branch 'main' into henrymercer/database-upload-telemetry * [`19c7f96`](github/codeql-action@19c7f96) Rename `isOverlayBase` * [`ae5de9a`](github/codeql-action@ae5de9a) Use `getErrorMessage` in log too * [`0cb8633`](github/codeql-action@0cb8633) Prefer `performance.now()` * [`c07cc0d`](github/codeql-action@c07cc0d) Merge pull request [ArcadeData#3351](https://redirect.github.com/github/codeql-action/issues/3351) from github/henrymercer/ghec-dr-determine-tools-vers... * Additional commits viewable in [compare view](github/codeql-action@1b168cd...5d4e8d1) [](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 merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@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)
…d server (ArcadeData#3352) * test: add unit tests for OpenCypher functions and Bolt chunked I/O Add 150 new unit tests to improve test coverage for: OpenCypher functions (133 tests): - Text functions: indexOf, split, join, capitalize, levenshtein, etc. - Math functions: sigmoid, tanh, cosh, sinh, maxLong, etc. - Convert functions: toInteger, toFloat, toBoolean, toJson, etc. - Date functions: currentTimestamp, format, field, fields, add, etc. - Util functions: md5, sha1, sha256, sha512 Bolt protocol (17 tests): - BoltChunkedInput and BoltChunkedOutput classes - Empty, small, and large message handling (>64KB) - Round-trip serialization verification - Replace magic number 65534 with message.length - 1 for better readability - Use containsEntry() instead of get().isEqualTo() for consistency * test: add comprehensive unit tests for DatabaseBackupConfig Add 58 unit tests covering: - DatabaseBackupConfig creation and JSON parsing - ScheduleConfig (FREQUENCY and CRON types, time windows, validation) - RetentionConfig (maxFiles, tiered retention) - TieredConfig (hourly, daily, weekly, monthly, yearly counts) - JSON serialization/deserialization round-trips - Merge with defaults behavior - Validation error cases * test: add unit tests for ExecutionResponse with accessor methods - Add getCode(), getResponse(), getBinary(), and isBinary() getters to ExecutionResponse class for testability - Create ExecutionResponseTest with 10 unit tests covering: - String and binary response construction - Various HTTP status codes (200, 201, 204, 400, 500) - Empty string and binary responses - Large payloads (100KB) - JSON response handling - Null string responses - Binary byte preservation * Add BackupSchedulerTest with 16 unit tests for scheduler lifecycle Tests cover: - Initial state verification (not running, zero scheduled) - Start/stop lifecycle management - Frequency-based backup scheduling - CRON-based backup scheduling - Multiple database handling - Cancel operations - Rescheduling (replacement behavior) - Disabled config handling - Invalid CRON expression handling - Immediate backup triggering * docs: add server module test coverage implementation plan Plan for adding ~55 unit tests across 3 test files: - DatabaseBackupConfigTest (configuration parsing, validation) - ExecutionResponseTest (HTTP response construction) - BackupSchedulerTest (scheduler lifecycle)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.