public void TestMultiThreadedWrites()
{
ClearPrevalenceBase();
CrashRecover();
AssertTotal(0);
Thread[] threads = new Thread[20];
for (int i = 0; i<threads.Length; ++i)
{
threads[i] = new Thread(new ThreadStart(ExecuteAddCommand));
}
Start(threads);
Join(threads);
CrashRecover();
// 20 threads adding the value 10, 10 times
AssertTotal(20*10*20);
}