From 51f1c13650b8abe6316445f0f423e7faef583c5c Mon Sep 17 00:00:00 2001 From: Kresten Krab Thorup Date: Thu, 5 Jan 2012 18:07:20 +0100 Subject: [PATCH] Assert nursery file is gone after inject --- src/fractal_btree.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fractal_btree.erl b/src/fractal_btree.erl index 62e0014..1aca9ee 100644 --- a/src/fractal_btree.erl +++ b/src/fractal_btree.erl @@ -156,6 +156,7 @@ flush_nursery(State=#state{nursery=Tree, top=Top}) -> gb_trees:to_list(Tree)), ok = fractal_btree_writer:close(BT), ok = fractal_btree_level:inject(Top, FileName), + {error, enoent} = file:read_file_info(FileName), {ok, State#state{ nursery=gb_trees:empty() } }; true -> {ok, State}