Closed tatsuya6502 closed 11 years ago
Added those flags. Commit: https://github.com/hibari/gdss-brick/commit/77abd8ed38d1aba05eb6cd3047a15adf800b1b76
Note that I changed metadata_directive
to attrib_directive
as there is already a flag get_all_attribs
present.
I wrote a simple test and it worked fine. I'll leave this open until I update the QuickCheck case.
Updated Hibari Application Developer's Guide (en, ja): https://github.com/hibari/hibari-doc/commit/67a627472285bab39c8ce3188ef68b4e23e92529
Updated the UBF contract in gdss-ubf-proto. Commit https://github.com/hibari/gdss-ubf-proto/commit/6955754a6cb8ffa1897b75609632ff7ed7c83ba8
Updated QuickCheck test cases.
https://github.com/hibari/gdss-admin/commit/3522f671f05baaa62f68c37d4c6b6976448f8184
gdss-brick >> GH13 and GH14 related - Update simple_eqc_tests:
- Generate attrib and exp_time directive flags for rename/6, replace/6, and set/6.
- Check exp time and custom attributes in get/4 response.
- Add -type and -spec.
Verification Ran the QuickCheck cases in simple_eqc_tests and verified that they passed 2,000 tests.
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:4:4] [async-threads:64] [hipe] [kernel-poll:true]
Eshell V5.9.3.1 (abort with ^G)
(hibariclient@127.0.0.1)1> simple_eqc_tests:run(2000).
prop_simple1:
Hibari: get_many() has been commented out from command()
Starting Quviq QuickCheck version 1.26.2
(compiled at {{2012,6,20},{8,22,48}})
Licence for ****
.c.Y...Y.v.cY.v.v...c..........cY.c......c....v..c....cv....c......YY.Y..v.c...vY.v.Y.vv..v..Y
...
OK, passed 2000 tests
51.30% {0,div10}
24.00% {1,div10}
12.15% {2,div10}
6.30% {3,div10}
2.55% {4,div10}
1.80% {5,div10}
0.95% {6,div10}
0.45% {7,div10}
0.25% {8,div10}
0.15% {9,div10}
0.05% {12,div10}
0.05% {11,div10}
prop_simple1_noproc_ok:
...
Hibari: get_many() has been commented out from command()
.......vc..cc..Y..cv......cY.Y..vv..Yv.....Y....YY.YY...v....vv......Y....
...
OK, passed 2000 tests
49.70% {0,div10}
24.55% {1,div10}
12.05% {2,div10}
6.55% {3,div10}
3.20% {4,div10}
1.95% {5,div10}
0.75% {6,div10}
0.50% {7,div10}
0.40% {8,div10}
0.20% {10,div10}
0.05% {22,div10}
0.05% {11,div10}
0.05% {9,div10}
[]
This functionality is only tested via brick_simple client (the native Erlang client). Testing via ubf client will be covered by https://github.com/hibari/gdss-ubf-proto/issues/7#issuecomment-15035476 before Hibari v0.3.1 release.
Close this issue.
Added simple eunit cases: https://github.com/hibari/gdss-admin/commit/41a3648e2c500f43081464ff1607d399bab00520
Erlang/OTP 17 [erts-6.3] [source] [64-bit] [smp:8:8] [async-threads:64] [hipe] [kernel-poll:true]
Eshell V6.3 (abort with ^G)
(hibariclient@127.0.0.1)1> brick_replace_rename_tests:test().
... All 2 tests passed.
ok
(hibariclient@127.0.0.1)2>
rename/6
operation introduced by https://github.com/hibari/gdss-brick/issues/2 does not preserve custom properties (metadata) and expiration time in old key value. This won't fit all use cases, and I personally feel more comfortable to preserve such info by default.Add an operation flag(s) to
rename/6
so that user can choose if she wants to preserve the matadata and/or expiration time.For example:
{matadata_directive, keep}
-- default{metadata_directive, replace}
{exp_directive, keep}
-- default{exp_directive, replace}
Target milestone: v0.3
(Edit: Mar 16) Change the subject from "Add metadata directive ..." to "Add attrib and exp_time directive ..."