You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
There is need for tests of error handling and statuses in pmemkv, and exceptions in bindings. Most generic approach is to implement engine, which may return error statuses on demand.
Description
New engine based which handle "magic keys and values" and return statuses accordingly.
Magic values may be inserted in such way:
put("method_name", "status")
which allows to configure test case, by simply putting kv pairs, and then calling adequate methods.
s = kv->put("non_magic_string_key", "some_value") // returns pmem::kv::status::OK
s = kv->put("get_all", "UNKNOWN_ERROR"); // returns pmem::kv::status::OK
s = kv->put("put", "INVALID_ARGUMENT"); // returns pmem::kv::status::INVALID_ARGUMENT
s = kv->get_all([](string_view k, string_view v){ return0;}) //retruns pmem::kv::status::UNKNOWN_ERROR
s = kv->put("get", "OUT_OF_MEMORY"); // returns pmem::kv::status::OK
s = kv->get("any_string", [](string_view v){return0;}); // returns pmem::kv::status::OUT_OF_MEMORY
Statuses configuration should be also configured for transactions and iterators (when implemented)
API Changes
New engine.
Implementation details
Probably should be based on blackhole with some additional std::map for inserted magic kv pairs.
The text was updated successfully, but these errors were encountered:
FEAT: Add test engine
Rationale
There is need for tests of error handling and statuses in pmemkv, and exceptions in bindings. Most generic approach is to implement engine, which may return error statuses on demand.
Description
New engine based which handle "magic keys and values" and return statuses accordingly.
Magic values may be inserted in such way:
which allows to configure test case, by simply putting kv pairs, and then calling adequate methods.
Statuses configuration should be also configured for transactions and iterators (when implemented)
API Changes
New engine.
Implementation details
Probably should be based on blackhole with some additional std::map for inserted magic kv pairs.
The text was updated successfully, but these errors were encountered: