-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Testing
We have a number of places in the code (all in tests and examples) that check the server version (grep for get_server_version).
This code
- relies on string-comparison (isn't really semver compliant)
- probably is not what we'd want users to actually do if they have server-version-dependent code-paths
Instead we could support a mongocxx::version value-type or something that a client could expose:
mongocxx::version minimum {3,6,0}; mongocxx::version actual = client.server_version(); if (actual < minimum) { throw std::logic_error("Server version " + actual + " < minimum " + minimum); }
(Just an idea I had - fine to resolve if others don't see the value or if there's a better alternative.)
- is depended on by
-
CXX-1037 Add Evergreen tasks for running integration tests against old stable server versions
- Closed