Lucene.Net.Search.TestTimeLimitingCollector.DoTestSearch C# (CSharp) Method

DoTestSearch() private method

private DoTestSearch ( ) : void
return void
        private void DoTestSearch()
        {
            int totalResults = 0;
            int totalTLCResults = 0;
            try
            {
                MyHitCollector myHc = new MyHitCollector();
                Search(myHc);
                totalResults = myHc.HitCount();

                myHc = new MyHitCollector();
                long oneHour = 3600000;
                Collector tlCollector = CreateTimedCollector(myHc, oneHour, false);
                Search(tlCollector);
                totalTLCResults = myHc.HitCount();
            }
            catch (Exception e)
            {
                e.printStackTrace();
                assertTrue("Unexpected exception: " + e, false); //==fail
            }
            assertEquals("Wrong number of results!", totalResults, totalTLCResults);
        }

Usage Example

コード例 #1
0
 public override void Run()
 {
     if (withTimeout)
     {
         outerInstance.DoTestTimeout(true, true);
     }
     else
     {
         outerInstance.DoTestSearch();
     }
     lock (success)
     {
         success.Set(num);
     }
 }
All Usage Examples Of Lucene.Net.Search.TestTimeLimitingCollector::DoTestSearch