anchor.diff:          fun setup/0,
           fun teardown/1,
           {with, [
  -                fun concurent_test/1
  +                fun run_test_eunit/1
           ]}
           }
       }.
   
  -concurent_test(_) ->
  +run_test_eunit(_) ->
  +    io:format(user, "EUNIT ---~n", []),
  +    run_test_core().
  +
  +run_test_core() ->
       async_insert(),
  -    timer:sleep(?THREAD_A_DELAY),
  +    timer:sleep(?THREAD_A_DELAY div 2),
       recv_async("_A_", ?THREAD_A_CHUNK, ?THREAD_A_DELAY),
  -    TotalDelay = round(?ROWCOUNT / ?THREAD_A_CHUNK * ?THREAD_A_DELAY + ?ROWCOUNT / ?THREAD_B_CHUNK * ?THREAD_B_DELAY + ?THREAD_A_DELAY),
  -%    TotalDelay = ?TEST_TIMEOUT div 400,
  -    io:format(user, "waiting... ~p~n", [TotalDelay]),
  +    recv_async("_B_", ?THREAD_B_CHUNK, ?THREAD_B_DELAY),
  +    TotalDelay = round(?ROWCOUNT / ?THREAD_A_CHUNK * ?THREAD_A_DELAY + ?ROWCOUNT / ?THREAD_B_CHUNK * ?THREAD_B_DELAY),
  +    io:format("waiting... ~p~n", [TotalDelay]),
       timer:sleep(TotalDelay).
  +
  +run_console() ->
  +    io:format(user, "CONSOLE ---~n", []),
  +    mnesia:start(),
  +    {atomic, ok} = mnesia:create_table(table, [{attributes, [col1, col2, col3]}]),
  +    run_test_core(),
  +    mnesia:delete_table(table),
  +    mnesia:stop().
   
   async_insert() ->
       F = fun
               (_, 0) -> ok;
               (F, R) ->
  +                timer:sleep(?THREAD_B_DELAY div 20),
                   mnesia:transaction(fun() ->
                       io:format(user, "insert ~p~n", [R]),
  -                    mnesia:write({?TABLE, R, R+1, R+2})
  +                    mnesia:write({table, R, R+1, R+2})
                   end),
  -%                timer:sleep(?THREAD_B_DELAY div 200),
                   F(F,R-1)
       end,
  -    spawn(fun() -> F(F, ?ROWCOUNT) end).
  +    spawn(fun() -> F(F, ?ROWCOUNT div 3) end).
   
   recv_async(Title, Limit, Delay) ->
       F0 = fun() ->
  
positive.code:             Pid ! next,
              receive
                  eot ->
                      io:format(user, "[~p] finished~n", [Title]);
                  {row, Row} ->
                      io:format(user, "[~p] got rows ~p~n", [Title, length(Row)]),
                      timer:sleep(Delay),
                      F(F)
              end
  
negative.code:                 end
          end
      end,
      spawn(mnesia, async_dirty, [F, [F,undefined]]).
  