Repository navigation
test(db): add tests for datetime storage - #685
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both tests rely on undefined database row ordering in positional assertions.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds SQLite regression tests that pin Chrono date/time storage formats ahead of the planned datetime-library migration.
Changes:
- Adds models for typed and textual datetime access.
- Tests bidirectional compatibility across fractional seconds and offsets.
| File | Description |
|---|---|
cot/tests/db_testing/mod.rs |
Registers the new test module. |
cot/tests/db_testing/datetime_storage.rs |
Adds datetime storage compatibility tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
| Project | cot |
| Branch | chrono-storage-tests |
| Testbed | github-ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| empty_router/empty_router | 📈 view plot 🚷 view threshold | 15,670.00 µs(+29.04%)Baseline: 12,143.72 µs | 18,504.68 µs (84.68%) |
| json_api/json_api | 📈 view plot 🚷 view threshold | 1,055.40 µs(+4.86%)Baseline: 1,006.47 µs | 1,344.65 µs (78.49%) |
| nested_routers/nested_routers | 📈 view plot 🚷 view threshold | 1,017.00 µs(+6.96%)Baseline: 950.84 µs | 1,254.48 µs (81.07%) |
| single_root_route/single_root_route | 📈 view plot 🚷 view threshold | 948.25 µs(+4.15%)Baseline: 910.48 µs | 1,210.24 µs (78.35%) |
| single_root_route_burst/single_root_route_burst | 📈 view plot 🚷 view threshold | 15,479.00 µs(-7.67%)Baseline: 16,764.12 µs | 22,169.67 µs (69.82%) |
m4tx
force-pushed
the
chrono-storage-tests
branch
from
October 4, 2026 16:22
2af614e to
c0c123f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
m4tx
force-pushed
the
chrono-storage-tests
branch
from
October 4, 2026 19:04
c0c123f to
a1d950e
Compare
m4tx
added this pull request to stack #700
October 12, 2026 16:50
ElijahAhianyo
approved these changes
Oct 19, 2026
m4tx
force-pushed
the
chrono-storage-tests
branch
from
October 19, 2026 18:27
a1d950e to
014e503
Compare
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related issue or discussion
#631
Description
This adds tests that pin the storage of datetime values in the database.
This is mostly useful for the upcoming jiff migration, to make sure after migrating to the new datetime crate, none of the values stored are changed.
Type of change
Checklist
just test-all)just clippy)cargo fmt)