Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 85A3A200C55 for ; Sun, 5 Mar 2017 12:48:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 847C2160B8F; Sun, 5 Mar 2017 11:48:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 944F2160B8E for ; Sun, 5 Mar 2017 12:48:43 +0100 (CET) Received: (qmail 52257 invoked by uid 500); 5 Mar 2017 11:48:42 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 50573 invoked by uid 99); 5 Mar 2017 11:48:41 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Mar 2017 11:48:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 705E1F3207; Sun, 5 Mar 2017 11:48:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Sun, 05 Mar 2017 11:49:16 -0000 Message-Id: <87c807b53e9542218bce475f93ee9708@git.apache.org> In-Reply-To: <4fe29577145241858a12e5d3848856ca@git.apache.org> References: <4fe29577145241858a12e5d3848856ca@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [37/50] [abbrv] lucenenet git commit: BUG: BUG: Lucene.Net.Tests.Util.TestFSTs.TestRandomWords(): Test causes NUnit to crash with OOM exception with verbosity enabled, so disabling verbosity by default and decreasing number of words from 1000 to 500 if v archived-at: Sun, 05 Mar 2017 11:48:44 -0000 BUG: BUG: Lucene.Net.Tests.Util.TestFSTs.TestRandomWords(): Test causes NUnit to crash with OOM exception with verbosity enabled, so disabling verbosity by default and decreasing number of words from 1000 to 500 if verbosity is enabled. Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/22c1d814 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/22c1d814 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/22c1d814 Branch: refs/heads/api-work Commit: 22c1d814d8af361b1e22e4b648a2f9760c4af1a5 Parents: cbafbfd Author: Shad Storhaug Authored: Sun Mar 5 04:16:37 2017 +0700 Committer: Shad Storhaug Committed: Sun Mar 5 17:08:47 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/22c1d814/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs index a69292c..caa3b6c 100644 --- a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs +++ b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs @@ -273,8 +273,15 @@ namespace Lucene.Net.Util.Fst [Test, LongRunningTest, HasTimeout] // 45 minutes to be on the safe side public virtual void TestRandomWords() { - fail("This test is somehow crashing NUnit and causing it not to complete"); - TestRandomWords(1000, AtLeast(2)); + // LUCENENET specific: NUnit will crash with an OOM if we do the full test + // with verbosity enabled. So, making this a manual setting that can be + // turned on if, and only if, needed for debugging. If the setting is turned + // on, we are decresing the number of iterations by 9/10, which seems to + // keep it from crashing. + bool isVerbose = false; // Enable manually + int maxNumWords = isVerbose ? 500 : 1000; + + TestRandomWords(maxNumWords, AtLeast(2), isVerbose); //testRandomWords(100, 1); } @@ -290,7 +297,7 @@ namespace Lucene.Net.Util.Fst } } - private void TestRandomWords(int maxNumWords, int numIter) + private void TestRandomWords(int maxNumWords, int numIter, bool VERBOSE) { Random random = new Random(Random().Next()); for (int iter = 0; iter < numIter; iter++) @@ -318,7 +325,7 @@ namespace Lucene.Net.Util.Fst [Ignore("LUCENENET TODO: This test will take around 10-14 hours to finish. It was marked with a Nightly attribute in the original Java source, but we don't currently have a corresponding attribute")] public virtual void TestBigSet() { - TestRandomWords(TestUtil.NextInt(Random(), 50000, 60000), 1); + TestRandomWords(TestUtil.NextInt(Random(), 50000, 60000), 1, false); } // Build FST for all unique terms in the test line docs