Skip to content

Commit

Permalink
Fix ar_kv tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shizzard committed Oct 3, 2024
1 parent c696ef8 commit bb6b6f3
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions apps/arweave/src/ar_kv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -734,13 +734,8 @@ destroy(Name) ->


test_close(Name) ->
[{_, {DB, _}}] = ets:lookup(?MODULE, Name),
ok = rocksdb:close(DB),
case ets:lookup(?MODULE, {config, Name}) of
[{_, {_, _, _, CfNames}}] ->
[ets:delete(?MODULE, {config, Name2}) || Name2 <- CfNames],
[ets:delete(?MODULE, Name2) || Name2 <- CfNames];
_ ->
ets:delete(?MODULE, {config, Name}),
ets:delete(?MODULE, Name)
end.
?WITH_DB(Name, fun(Db) ->
_ = flush(Db),
_ = sync_wal(Db),
_ = close(Db)
end).

0 comments on commit bb6b6f3

Please sign in to comment.