Return-Path: Delivered-To: apmail-incubator-lucene-net-commits-archive@locus.apache.org Received: (qmail 4410 invoked from network); 31 Jul 2008 22:56:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2008 22:56:00 -0000 Received: (qmail 43064 invoked by uid 500); 31 Jul 2008 22:55:59 -0000 Delivered-To: apmail-incubator-lucene-net-commits-archive@incubator.apache.org Received: (qmail 43048 invoked by uid 500); 31 Jul 2008 22:55:59 -0000 Mailing-List: contact lucene-net-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@incubator.apache.org Delivered-To: mailing list lucene-net-commits@incubator.apache.org Received: (qmail 43039 invoked by uid 99); 31 Jul 2008 22:55:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 15:55:59 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 22:55:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C98222388988; Thu, 31 Jul 2008 15:54:59 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r681533 - /incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriterDelete.cs Date: Thu, 31 Jul 2008 22:54:59 -0000 To: lucene-net-commits@incubator.apache.org From: aroush@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080731225459.C98222388988@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: aroush Date: Thu Jul 31 15:54:59 2008 New Revision: 681533 URL: http://svn.apache.org/viewvc?rev=681533&view=rev Log: LUCENENET-134 "broken test cases in unit test class TestIndexWriterDelete.cs" Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriterDelete.cs Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriterDelete.cs URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestIndexWriterDelete.cs?rev=681533&r1=681532&r2=681533&view=diff ============================================================================== --- incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriterDelete.cs (original) +++ incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriterDelete.cs Thu Jul 31 15:54:59 2008 @@ -69,18 +69,16 @@ if (sawMaybe && !failed) { bool seen = false; - // {{DOUG-2.3.1}} this code is suspect. i have preserved the original (below) for - // comparative purposes. - seen = new System.Exception().StackTrace.Contains("applyDeletes"); - //StackTraceElement[] trace = new System.Exception().getStackTrace(); - //for (int i = 0; i < trace.Length; i++) - //{ - // if ("applyDeletes".Equals(trace[i].getMethodName())) - // { - // seen = true; - // break; - // } - //} + System.Diagnostics.StackFrame[] frames = new System.Diagnostics.StackTrace().GetFrames(); + for (int i = 0; i < frames.Length; i++) + { + System.String methodName = frames[i].GetMethod().Name; + if ("ApplyDeletes".Equals(methodName)) + { + seen = true; + break; + } + } if (!seen) { // Only fail once we are no longer in applyDeletes @@ -90,18 +88,16 @@ } if (!failed) { - // {{DOUG-2.3.1}} this code is suspect. i have preserved the original (below) for - // comparative purposes. - sawMaybe = new System.Exception().StackTrace.Contains("applyDeletes"); - //StackTraceElement[] trace = new System.Exception().getStackTrace(); - //for (int i = 0; i < trace.Length; i++) - //{ - // if ("applyDeletes".Equals(trace[i].getMethodName())) - // { - // sawMaybe = true; - // break; - // } - //} + System.Diagnostics.StackFrame[] frames = new System.Diagnostics.StackTrace().GetFrames(); + for (int i = 0; i < frames.Length; i++) + { + System.String methodName = frames[i].GetMethod().Name; + if ("ApplyDeletes".Equals(methodName)) + { + sawMaybe = true; + break; + } + } } } } @@ -621,7 +617,7 @@ // System.out.println(" startFiles: " + i + ": " + startFiles[i]); // } - if (!startFiles.Equals(endFiles)) + if (!SupportClass.Compare.CompareStringArrays(startFiles, endFiles)) { System.String successStr; if (success) @@ -880,7 +876,7 @@ new IndexFileDeleter(dir, new KeepOnlyLastCommitDeletionPolicy(), infos, null, null); System.String[] endFiles = dir.List(); - if (!startFiles.Equals(endFiles)) + if (!SupportClass.Compare.CompareStringArrays(startFiles, endFiles)) { Assert.Fail("docswriter abort() failed to delete unreferenced files:\n before delete:\n " + ArrayToString(startFiles) + "\n after delete:\n " + ArrayToString(endFiles)); }