public virtual void TestThreadSafety()
{
BaseDirectoryWrapper dir = NewDirectory();
dir.CheckIndexOnClose = false; // we arent making an index
if (dir is MockDirectoryWrapper)
{
((MockDirectoryWrapper)dir).Throttling = Throttling.NEVER; // makes this test really slow
}
if (VERBOSE)
{
Console.WriteLine(dir);
}
TheThread theThread = new TheThread("t1", dir);
TheThread2 theThread2 = new TheThread2("t2", dir);
theThread.Start();
theThread2.Start();
theThread.Join();
theThread2.Join();
dir.Dispose();
}