lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r680858 - /incubator/lucene.net/trunk/C#/src/Test/Index/TestConcurrentMergeScheduler.cs
Date Tue, 29 Jul 2008 22:08:11 GMT
Author: aroush
Date: Tue Jul 29 15:08:11 2008
New Revision: 680858

URL: http://svn.apache.org/viewvc?rev=680858&view=rev
Log:
LUCENENET-126 "Nunit test: Index/TestConcurrentMergeScheduler/TestFlushExceptions"

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Index/TestConcurrentMergeScheduler.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestConcurrentMergeScheduler.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestConcurrentMergeScheduler.cs?rev=680858&r1=680857&r2=680858&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestConcurrentMergeScheduler.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestConcurrentMergeScheduler.cs Tue Jul 29
15:08:11 2008
@@ -53,19 +53,12 @@
 			{
 				if (doFail)
 				{
-					// {{DOUG-2.3.1}} this code is suspect.  i have preserved the original (below) for 
-					// comparative purposes.
-					if (new System.Exception().StackTrace.Contains("doFlush"))
-						throw new System.IO.IOException("now failing during flush");
-					//StackTraceElement[] trace = new System.Exception().getStackTrace();
-					//for (int i = 0; i < trace.Length; i++)
-					//{
-					//    if ("doFlush".Equals(trace[i].getMethodName()))
-					//    {
-					//        //new RuntimeException().printStackTrace(System.out);
-					//        throw new System.IO.IOException("now failing during flush");
-					//    }
-					//}
+					System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace();
+					foreach (System.Diagnostics.StackFrame f in st.GetFrames())
+					{
+						if ("DoFlush" == f.GetMethod().Name)
+							throw new System.IO.IOException("now failing during flush");
+					}
 				}
 			}
 		}



Mime
View raw message