Anonymous avatar Anonymous committed 72506cc

a case with sibling vclocks and different last-mods to test path through compare_content_dates/2

Comments (0)

Files changed (1)


+date_reconcile_test() ->
+    {O,O3} = reconcile_test(),
+    D = calendar:datetime_to_gregorian_seconds(
+          httpd_util:convert_request_date(
+            httpd_util:rfc1123_date())),
+    O2 = apply_updates(
+           riak_object:update_metadata(
+             increment_vclock(O, date),
+             dict:store(
+               <<"X-Riak-Last-Modified">>,
+               httpd_util:rfc1123_date(
+                 calendar:gregorian_seconds_to_datetime(D)),
+               get_metadata(O)))),
+    O4 = apply_updates(
+           riak_object:update_metadata(
+             O3,
+             dict:store(
+               <<"X-Riak-Last-Modified">>,
+               httpd_util:rfc1123_date(
+                 calendar:gregorian_seconds_to_datetime(D+1)),
+               get_metadata(O3)))),
+    O5 = riak_object:reconcile([O2,O4], false),
+    false = riak_object:equal(O2, O5),
+    false = riak_object:equal(O4, O5).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.