summaryrefslogtreecommitdiff
path: root/apps/mem3
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-08-27 17:42:27 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-27 17:47:42 -0400
commit7b0005be9dd45a0ce3639a7f5db58c1d2df2e485 (patch)
treec20a8f061210fa07dc2d03e09cbaffeea9ca6e3e /apps/mem3
parentc3bd782ff1b3eb91b238f5ca3436edafd017c61c (diff)
my name is BigCouch
Diffstat (limited to 'apps/mem3')
-rw-r--r--apps/mem3/test/mem3_util_test.erl50
1 files changed, 25 insertions, 25 deletions
diff --git a/apps/mem3/test/mem3_util_test.erl b/apps/mem3/test/mem3_util_test.erl
index f43410a7..490521cf 100644
--- a/apps/mem3/test/mem3_util_test.erl
+++ b/apps/mem3/test/mem3_util_test.erl
@@ -52,68 +52,68 @@ build_shards_test() ->
DocProps1 =
[{<<"changelog">>,
[[<<"add">>,<<"00000000-1fffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"20000000-3fffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"40000000-5fffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"60000000-7fffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"80000000-9fffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"a0000000-bfffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"c0000000-dfffffff">>,
- <<"dbcore@node.local">>],
+ <<"bigcouch@node.local">>],
[<<"add">>,<<"e0000000-ffffffff">>,
- <<"dbcore@node.local">>]]},
+ <<"bigcouch@node.local">>]]},
{<<"by_node">>,
- {[{<<"dbcore@node.local">>,
+ {[{<<"bigcouch@node.local">>,
[<<"00000000-1fffffff">>,<<"20000000-3fffffff">>,
<<"40000000-5fffffff">>,<<"60000000-7fffffff">>,
<<"80000000-9fffffff">>,<<"a0000000-bfffffff">>,
<<"c0000000-dfffffff">>,<<"e0000000-ffffffff">>]}]}},
{<<"by_range">>,
- {[{<<"00000000-1fffffff">>,[<<"dbcore@node.local">>]},
- {<<"20000000-3fffffff">>,[<<"dbcore@node.local">>]},
- {<<"40000000-5fffffff">>,[<<"dbcore@node.local">>]},
- {<<"60000000-7fffffff">>,[<<"dbcore@node.local">>]},
- {<<"80000000-9fffffff">>,[<<"dbcore@node.local">>]},
- {<<"a0000000-bfffffff">>,[<<"dbcore@node.local">>]},
- {<<"c0000000-dfffffff">>,[<<"dbcore@node.local">>]},
- {<<"e0000000-ffffffff">>,[<<"dbcore@node.local">>]}]}}],
+ {[{<<"00000000-1fffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"20000000-3fffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"40000000-5fffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"60000000-7fffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"80000000-9fffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"a0000000-bfffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"c0000000-dfffffff">>,[<<"bigcouch@node.local">>]},
+ {<<"e0000000-ffffffff">>,[<<"bigcouch@node.local">>]}]}}],
Shards1 = mem3_util:build_shards(<<"testdb1">>, DocProps1),
ExpectedShards1 =
[{shard,<<"shards/00000000-1fffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[0,536870911],
undefined},
{shard,<<"shards/20000000-3fffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[536870912,1073741823],
undefined},
{shard,<<"shards/40000000-5fffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[1073741824,1610612735],
undefined},
{shard,<<"shards/60000000-7fffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[1610612736,2147483647],
undefined},
{shard,<<"shards/80000000-9fffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[2147483648,2684354559],
undefined},
{shard,<<"shards/a0000000-bfffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[2684354560,3221225471],
undefined},
{shard,<<"shards/c0000000-dfffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[3221225472,3758096383],
undefined},
{shard,<<"shards/e0000000-ffffffff/testdb1">>,
- 'dbcore@node.local',<<"testdb1">>,
+ 'bigcouch@node.local',<<"testdb1">>,
[3758096384,4294967295],
undefined}],
?assertEqual(ExpectedShards1, Shards1),