Dialyzer changes
Some chnages to improve dialyzer pass rate
This commit is contained in:
parent
4e28e4173c
commit
c10eaa75cb
7 changed files with 33 additions and 38 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1 +1,3 @@
|
||||||
*.beam
|
*.beam
|
||||||
|
/.eunit
|
||||||
|
/_build
|
BIN
.rebar/erlcinfo
Normal file
BIN
.rebar/erlcinfo
Normal file
Binary file not shown.
|
@ -1,11 +0,0 @@
|
||||||
{application,eleveleddb,
|
|
||||||
[{description,[]},
|
|
||||||
{vsn,"1"},
|
|
||||||
{registered,[]},
|
|
||||||
{applications,[kernel,stdlib]},
|
|
||||||
{mod,{eleveleddb_app,[]}},
|
|
||||||
{env,[]},
|
|
||||||
{modules,[eleveleddb_app,eleveleddb_sup,leveled_bookie,
|
|
||||||
leveled_cdb,leveled_clerk,leveled_inker,
|
|
||||||
leveled_iterator,leveled_penciller,leveled_rice,
|
|
||||||
leveled_sft]}]}.
|
|
1
rebar.lock
Normal file
1
rebar.lock
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[].
|
|
@ -1323,8 +1323,7 @@ getnextkey_inclemptyvalue_test() ->
|
||||||
{_, Handle, P6} = get_nextkey(Handle, P5),
|
{_, Handle, P6} = get_nextkey(Handle, P5),
|
||||||
{_, Handle, P7} = get_nextkey(Handle, P6),
|
{_, Handle, P7} = get_nextkey(Handle, P6),
|
||||||
{_, Handle, P8} = get_nextkey(Handle, P7),
|
{_, Handle, P8} = get_nextkey(Handle, P7),
|
||||||
{LastKey, Info} = get_nextkey(Handle, P8),
|
{LastKey, nomorekeys} = get_nextkey(Handle, P8),
|
||||||
?assertMatch(nomorekeys, Info),
|
|
||||||
?assertMatch("K1", LastKey),
|
?assertMatch("K1", LastKey),
|
||||||
ok = file:delete("../test/hashtable2_test.cdb").
|
ok = file:delete("../test/hashtable2_test.cdb").
|
||||||
|
|
||||||
|
|
|
@ -314,15 +314,17 @@ find_randomkeys(FList, Count, Source) ->
|
||||||
K1 = leveled_bookie:strip_to_keyonly(KV1),
|
K1 = leveled_bookie:strip_to_keyonly(KV1),
|
||||||
P1 = choose_pid_toquery(FList, K1),
|
P1 = choose_pid_toquery(FList, K1),
|
||||||
FoundKV = leveled_sft:sft_get(P1, K1),
|
FoundKV = leveled_sft:sft_get(P1, K1),
|
||||||
case FoundKV of
|
Check = case FoundKV of
|
||||||
not_present ->
|
not_present ->
|
||||||
io:format("Failed to find ~w in ~w~n", [K1, P1]),
|
io:format("Failed to find ~w in ~w~n", [K1, P1]),
|
||||||
?assertMatch(true, false);
|
error;
|
||||||
_ ->
|
_ ->
|
||||||
Found = leveled_bookie:strip_to_keyonly(FoundKV),
|
Found = leveled_bookie:strip_to_keyonly(FoundKV),
|
||||||
io:format("success finding ~w in ~w~n", [K1, P1]),
|
io:format("success finding ~w in ~w~n", [K1, P1]),
|
||||||
?assertMatch(K1, Found)
|
?assertMatch(K1, Found),
|
||||||
end,
|
ok
|
||||||
|
end,
|
||||||
|
?assertMatch(Check, ok),
|
||||||
find_randomkeys(FList, Count - 1, Source).
|
find_randomkeys(FList, Count - 1, Source).
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@
|
||||||
levelzero_snapshot = [] :: list(),
|
levelzero_snapshot = [] :: list(),
|
||||||
memtable,
|
memtable,
|
||||||
backlog = false :: boolean(),
|
backlog = false :: boolean(),
|
||||||
memtable_maxsize :: integer}).
|
memtable_maxsize :: integer()}).
|
||||||
|
|
||||||
|
|
||||||
%%%============================================================================
|
%%%============================================================================
|
||||||
|
@ -945,20 +945,22 @@ simple_server_test() ->
|
||||||
{ok, PCLr} = pcl_start(#penciller_options{root_path=RootPath,
|
{ok, PCLr} = pcl_start(#penciller_options{root_path=RootPath,
|
||||||
max_inmemory_tablesize=1000}),
|
max_inmemory_tablesize=1000}),
|
||||||
TopSQN = pcl_getstartupsequencenumber(PCLr),
|
TopSQN = pcl_getstartupsequencenumber(PCLr),
|
||||||
case TopSQN of
|
Check = case TopSQN of
|
||||||
2001 ->
|
2001 ->
|
||||||
%% Last push not persisted
|
%% Last push not persisted
|
||||||
S3a = pcl_pushmem(PCL, [Key3]),
|
S3a = pcl_pushmem(PCL, [Key3]),
|
||||||
if S3a == pause -> timer:sleep(2000); true -> ok end;
|
if S3a == pause -> timer:sleep(2000); true -> ok end,
|
||||||
2002 ->
|
ok;
|
||||||
%% everything got persisted
|
2002 ->
|
||||||
ok;
|
%% everything got persisted
|
||||||
_ ->
|
ok;
|
||||||
io:format("Unexpected sequence number on restart ~w~n", [TopSQN]),
|
_ ->
|
||||||
ok = pcl_close(PCLr),
|
io:format("Unexpected sequence number on restart ~w~n", [TopSQN]),
|
||||||
clean_testdir(RootPath),
|
ok = pcl_close(PCLr),
|
||||||
?assertMatch(true, false)
|
clean_testdir(RootPath),
|
||||||
end,
|
error
|
||||||
|
end,
|
||||||
|
?assertMatch(Check, ok),
|
||||||
R8 = pcl_fetch(PCLr, {o,"Bucket0001", "Key0001"}),
|
R8 = pcl_fetch(PCLr, {o,"Bucket0001", "Key0001"}),
|
||||||
R9 = pcl_fetch(PCLr, {o,"Bucket0002", "Key0002"}),
|
R9 = pcl_fetch(PCLr, {o,"Bucket0002", "Key0002"}),
|
||||||
R10 = pcl_fetch(PCLr, {o,"Bucket0003", "Key0003"}),
|
R10 = pcl_fetch(PCLr, {o,"Bucket0003", "Key0003"}),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue