Uncomment concurrent_inserts_test

This commit is contained in:
Alexey Romanov
2010-12-09 15:56:29 +03:00
parent f628471d17
commit 007685971d

View File

@@ -165,21 +165,21 @@ select_many_records() ->
N, N,
length(rows(sqlite3:sql_exec(ct, "select * from many_records;")))). length(rows(sqlite3:sql_exec(ct, "select * from many_records;")))).
%% %% note that inserts are actually serialized by gen_server %% note that inserts are actually serialized by gen_server
%% concurrent_inserts_test() -> concurrent_inserts_test() ->
%% N = 1024, N = 1024,
%% sqlite3:open(concurrent, [in_memory]), %% doing this test not in memory is much slower! sqlite3:open(concurrent, [in_memory]), %% doing this test not in memory is much slower!
%% drop_table_if_exists(concurrent, t), drop_table_if_exists(concurrent, t),
%% sqlite3:create_table(concurrent, t, [{id0, integer}]), sqlite3:create_table(concurrent, t, [{id0, integer}]),
%% Self = self(), Self = self(),
%% [spawn(fun () -> [spawn(fun () ->
%% sqlite3:write(concurrent, t, [{id0, X}]), sqlite3:write(concurrent, t, [{id0, X}]),
%% Self ! {finished, N} Self ! {finished, N}
%% end) || X <- lists:seq(1, N)], end) || X <- lists:seq(1, N)],
%% loop_concurrent_inserts(N), loop_concurrent_inserts(N),
%% ?assertEqual( ?assertEqual(
%% N, length(rows(sqlite3:read_all(concurrent, t)))), N, length(rows(sqlite3:read_all(concurrent, t)))),
%% sqlite3:close(concurrent). sqlite3:close(concurrent).
loop_concurrent_inserts(0) -> loop_concurrent_inserts(0) ->
ok; ok;