anchor.diff:      unittest_helper:stop_ring(),
       Config.
   
  --define(TEST_DB,db_ets).
  +-define(TEST_DB, db_ets).
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   % snapshot-related DB API tests 
  
positive.code: -spec test_single_snapshot_call(any()) -> ok.
  test_single_snapshot_call(_) ->
      unittest_helper:make_ring(10),
      api_tx:req_list([{write,"A",1},{write,"B",2},{write,"C",3},{write,"D",4},{commit}]),
      ActualSnap = api_tx:get_system_snapshot(),                        
      ?equals_pattern(ActualSnap,[{_,_,0},{_,_,0},{_,_,0},{_,_,0}]),
      ok.
      
  -spec test_basic_race_multiple_snapshots(any()) -> ok.
  test_basic_race_multiple_snapshots(_) ->
      unittest_helper:make_ring(4),
      api_tx:req_list([{read,"A"},{read,"B"},{write,"A",8},
                       {read,"A"},{read,"A"},{read,"A"},{write,"B", 9},{commit}]),
      tester:test(api_tx, get_system_snapshot, 0, 100),
      ok.
  
  
negative.code: -spec test_rdht_tx_read_validate_should_abort(any()) -> ok.
  test_rdht_tx_read_validate_should_abort(_) ->
      Db = ?TEST_DB:init_snapshot(?TEST_DB:new()),
      Db = ?TEST_DB:set_entry(Db, db_entry:new("key", "val", 1)),
      TLogEntry = tx_tlog:new_entry(rdht_tx_read, "key", 1, value, 1, ?value, "new_val"),
      {_NewDb, Vote} = rdht_tx_read:validate(Db, 5, TLogEntry),
      ?equals(Vote, ?abort),
      ok.
  
  % snapshot number in entry equals local number -> prepared
  -spec test_rdht_tx_read_validate_should_prepare(any()) -> ok.
  test_rdht_tx_read_validate_should_prepare(_) ->
      Db = ?TEST_DB:init_snapshot(?TEST_DB:new()),
      Db = ?TEST_DB:set_entry(Db, db_entry:new("key", "val", 1)),
      TLogEntry = tx_tlog:new_entry(rdht_tx_read, "key", 1, value, 4711, ?value, "new_val"),
      {_NewDb, Vote} = rdht_tx_read:validate(Db, 4711, TLogEntry),
      ?equals(Vote, ?prepared),
      ok.
  
  % if a snapshot is running, locking should only occur in the live db
  