|
|
@@ -160,17 +160,17 @@ void test_cache_reflects_configure_immediately() {
|
|
|
CollectionConfigManager mgr(store);
|
|
|
store.setConfigManager(&mgr);
|
|
|
|
|
|
- // Before configure: default ms, not explicit.
|
|
|
- assert(mgr.configFor("docs_cache").timestampPrecision == "ms");
|
|
|
+ // Before configure: default ns (v2.2), not explicit.
|
|
|
+ assert(mgr.configFor("docs_cache").timestampPrecision == "ns");
|
|
|
assert(!mgr.hasExplicitConfig("docs_cache"));
|
|
|
|
|
|
CollectionCfg cfg;
|
|
|
- cfg.timestampPrecision = "ns";
|
|
|
+ cfg.timestampPrecision = "ms";
|
|
|
std::string err;
|
|
|
assert(mgr.setConfig("docs_cache", cfg, err));
|
|
|
|
|
|
- // After configure: ns, immediately — no reloadFromStore() required.
|
|
|
- assert(mgr.configFor("docs_cache").timestampPrecision == "ns");
|
|
|
+ // After configure: ms, immediately — no reloadFromStore() required.
|
|
|
+ assert(mgr.configFor("docs_cache").timestampPrecision == "ms");
|
|
|
assert(mgr.hasExplicitConfig("docs_cache"));
|
|
|
|
|
|
store.stop();
|
|
|
@@ -184,7 +184,9 @@ void test_default_for_unknown_collection() {
|
|
|
store.setConfigManager(&mgr);
|
|
|
|
|
|
auto cfg = mgr.configFor("never_configured_collection");
|
|
|
- assert(cfg.timestampPrecision == "ms");
|
|
|
+ // v2.2 — default flipped from "ms" to "ns" so rapid-write collections
|
|
|
+ // get nanosecond stamps without an explicit configureCollection() call.
|
|
|
+ assert(cfg.timestampPrecision == "ns");
|
|
|
assert(!mgr.hasExplicitConfig("never_configured_collection"));
|
|
|
|
|
|
store.stop();
|