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

Versioned serialization/deserialization tests #25493

Open
hiltontj opened this issue Oct 25, 2024 · 0 comments
Open

Versioned serialization/deserialization tests #25493

hiltontj opened this issue Oct 25, 2024 · 0 comments
Labels

Comments

@hiltontj
Copy link
Contributor

For anything that needs to be serialized and stored to disk, then deserialized from disk to RAM, we need some means of testing that the file format and serialized representation remains backward compatible as influxdb evolves. From #25492 (review), in order to test this, we would need something along these lines:

  • A static file with the appropriate data members checked into the repo
  • A test that can deserialize the static file and validate it has the members we expect (this is all hard coded stuff)
  • Another test that takes an in memory structure, serializes it, then deserializes that and validates they're the same (this might be unnecessary)

Using something like insta doesn't work for us since we use a lot of HashMaps in our data types, whose ordering is not deterministic and therefore makes the use of a snapshotting tool like insta too brittle.

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

No branches or pull requests

1 participant