Lucene.Net.Index.TestFlushByRamOrCountsPolicy.AssertActiveBytesAfter C# (CSharp) Method

AssertActiveBytesAfter() protected method

protected AssertActiveBytesAfter ( DocumentsWriterFlushControl flushControl ) : void
flushControl DocumentsWriterFlushControl
return void
        protected internal virtual void AssertActiveBytesAfter(DocumentsWriterFlushControl flushControl)
        {
            IEnumerator<ThreadState> allActiveThreads = flushControl.AllActiveThreadStates();
            long bytesUsed = 0;
            while (allActiveThreads.MoveNext())
            {
                ThreadState next = allActiveThreads.Current;
                if (next.DocumentsWriterPerThread != null)
                {
                    bytesUsed += next.DocumentsWriterPerThread.BytesUsed();
                }
            }
            Assert.AreEqual(bytesUsed, flushControl.ActiveBytes());
        }