Browse Source

fix tests

Namdak Tonpa 4 years ago
parent
commit
0a71d50aa9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/stores/kvs_rocks.erl

+ 1 - 1
src/stores/kvs_rocks.erl

@@ -84,7 +84,7 @@ compile(move)     -> [fun rocksdb:iterator_move/2];
 compile(close)    -> [fun rocksdb:iterator_close/1].
 compile(take,N)   -> lists:map(fun(_) -> fun rocksdb:iterator_move/2 end, lists:seq(1, N)).
 
-stop_it(H)        -> try (compile(close))(H) catch error:badarg -> ok end.
+stop_it(H)        -> try begin [F]=compile(close), F(H) end catch error:badarg -> ok end.
 seek_it(K)        -> o(K,K,ok,compile(seek)).
 move_it(K,FK,Dir) -> o(K,FK,Dir,compile(seek) ++ compile(move)).
 take_it(Key,FK,Dir,N) when is_integer(N) andalso N >= 0 -> o(Key,FK,Dir,compile(seek) ++ compile(take,N));