anchor.diff:          ok = couch_db:close(Db2),
           {ok, Db3} = couch_db:create(?tempdb(), [?ADMIN_CTX]),
           ok = couch_db:close(Db3),
  +
  +        wait_for_process_shutdown(DatabaseMonRef, killed,
  +          {reason, "Failure waiting for db shutdown"}),
  +        wait_for_process_shutdown(DesignDocMonRef, normal,
  +          {reason, "Failure waiting for view index shutdown"}),
   
           Writer1 = spawn_writer(Db1#db.name),
           Writer2 = spawn_writer(Db2#db.name),
  
positive.code:         ok = populate_db(MDb1, 100, 100),
          query_view(MDb1#db.name, "foo", "foo"),
          ok = couch_db:close(MDb1),
  
          {ok, Db1} = couch_db:create(?tempdb(), [?ADMIN_CTX]),
          ok = couch_db:close(Db1),
  
negative.code: 
          %% Resume compaction
          erlang:resume_process(CPid),
          wait_for_process_shutdown(MonRef, normal,
            {reason, "Failure compacting view group"}),
  
          ?assertEqual(ok, writer_try_again(Writer3)),
          ?assertEqual(ok, get_writer_status(Writer3)),
  