Пример #1
0
        public virtual void TestAddIndexesWithCloseNoWait()
        {
            const int NUM_COPY = 50;
            CommitAndAddIndexes3 c = new CommitAndAddIndexes3(this, NUM_COPY);
            c.LaunchThreads(-1);

            Thread.Sleep(TestUtil.NextInt(Random(), 10, 500));

            // Close w/o first stopping/joining the threads
            if (VERBOSE)
            {
                Console.WriteLine("TEST: now close(false)");
            }
            c.Close(false);

            c.JoinThreads();

            if (VERBOSE)
            {
                Console.WriteLine("TEST: done join threads");
            }
            c.CloseDir();

            Assert.IsTrue(c.Failures.Count == 0);
        }
Пример #2
0
		public virtual void  TestAddIndexesWithCloseNoWait()
		{
			
			int NUM_COPY = 50;
			CommitAndAddIndexes3 c = new CommitAndAddIndexes3(this, NUM_COPY);
			c.LaunchThreads(- 1);
			
			System.Threading.Thread.Sleep(new System.TimeSpan((System.Int64) 10000 * 500));
			
			// Close w/o first stopping/joining the threads
			c.Close(false);
			
			c.JoinThreads();
			
			_TestUtil.CheckIndex(c.dir2);
			
			c.CloseDir();
			
			Assert.IsTrue(c.failures.Count == 0);
		}