From 96a548e17a760bdb78e5bac909b94a6c720540b7 Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Tue, 23 May 2017 15:54:11 +0100 Subject: [PATCH] Change tests - binary keys the new code requires bucket listing to be on binary keys not just binary buckets. As this is only intended for use within Riak (where all keys are buckets are binaries), this constraint seems OK. A test needed changing to ensure it had a binary key in the bucket. --- test/end_to_end/iterator_SUITE.erl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/end_to_end/iterator_SUITE.erl b/test/end_to_end/iterator_SUITE.erl index 8c0246e..dd03edb 100644 --- a/test/end_to_end/iterator_SUITE.erl +++ b/test/end_to_end/iterator_SUITE.erl @@ -97,7 +97,7 @@ small_load_with2i(_Config) -> IdxQ1 = {index_query, "Bucket", {fun testutil:foldkeysfun/3, []}, - {"idx1_bin", "#", "~"}, + {"idx1_bin", "#", "|"}, {true, undefined}}, {async, IdxFolder} = leveled_bookie:book_returnfolder(Bookie1, IdxQ1), KeyList1 = lists:usort(IdxFolder()), @@ -106,7 +106,7 @@ small_load_with2i(_Config) -> IdxQ2 = {index_query, {"Bucket", LastKey}, {fun testutil:foldkeysfun/3, []}, - {"idx1_bin", LastTerm, "~"}, + {"idx1_bin", LastTerm, "|"}, {false, undefined}}, {async, IdxFolderLK} = leveled_bookie:book_returnfolder(Bookie1, IdxQ2), KeyList2 = lists:usort(IdxFolderLK()), @@ -141,7 +141,7 @@ small_load_with2i(_Config) -> ?RIAK_TAG, "Bucket", {"idx1_bin", - "#", "~"}, + "#", "|"}, FoldObjectsFun}), KeyHashList3 = HTreeF3(), true = 9901 == length(KeyHashList1), % also includes the test object @@ -186,7 +186,7 @@ query_count(_Config) -> testutil:sync_strategy()), BucketBin = list_to_binary("Bucket"), {TestObject, TestSpec} = testutil:generate_testobject(BucketBin, - "Key1", + term_to_binary("Key1"), "Value1", [], [{"MDK1", "MDV1"}]), @@ -269,7 +269,7 @@ query_count(_Config) -> Query1 = {index_query, BucketBin, {fun testutil:foldkeysfun/3, []}, - {"idx2_bin", "2000", "2000~"}, + {"idx2_bin", "2000", "2000|"}, {false, RegMia}}, {async, Mia2KFolder1} = leveled_bookie:book_returnfolder(Book2, Query1), @@ -396,8 +396,7 @@ query_count(_Config) -> io:format("Bucket set returned in ~w microseconds", [timer:now_diff(os:timestamp(), SW_QA)]), - true = sets:size(BucketSet1) == 1, - true = sets:is_element(list_to_binary("Bucket"), BucketSet1), + true = sets:size(BucketSet1) == 1, ObjList10A = testutil:generate_objects(5000, binary_uuid,