From lucene-net-commits-return-2092-apmail-lucene-lucene-net-commits-archive=lucene.apache.org@lucene.apache.org Mon Aug 20 21:58:04 2012 Return-Path: X-Original-To: apmail-lucene-lucene-net-commits-archive@www.apache.org Delivered-To: apmail-lucene-lucene-net-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6B6074A for ; Mon, 20 Aug 2012 21:58:04 +0000 (UTC) Received: (qmail 56332 invoked by uid 500); 20 Aug 2012 21:58:04 -0000 Delivered-To: apmail-lucene-lucene-net-commits-archive@lucene.apache.org Received: (qmail 56292 invoked by uid 500); 20 Aug 2012 21:58:04 -0000 Mailing-List: contact lucene-net-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucene.apache.org Delivered-To: mailing list lucene-net-commits@lucene.apache.org Received: (qmail 56285 invoked by uid 99); 20 Aug 2012 21:58:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2012 21:58:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Mon, 20 Aug 2012 21:58:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8488523888FE; Mon, 20 Aug 2012 21:57:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1375269 - in /incubator/lucene.net/trunk/test/contrib/Spatial: Prefix/TestRecursivePrefixTreeStrategy.cs StrategyTestCase.cs Date: Mon, 20 Aug 2012 21:57:18 -0000 To: lucene-net-commits@lucene.apache.org From: synhershko@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120820215718.8488523888FE@eris.apache.org> Author: synhershko Date: Mon Aug 20 21:57:18 2012 New Revision: 1375269 URL: http://svn.apache.org/viewvc?rev=1375269&view=rev Log: Fixing tests Modified: incubator/lucene.net/trunk/test/contrib/Spatial/Prefix/TestRecursivePrefixTreeStrategy.cs incubator/lucene.net/trunk/test/contrib/Spatial/StrategyTestCase.cs Modified: incubator/lucene.net/trunk/test/contrib/Spatial/Prefix/TestRecursivePrefixTreeStrategy.cs URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Spatial/Prefix/TestRecursivePrefixTreeStrategy.cs?rev=1375269&r1=1375268&r2=1375269&view=diff ============================================================================== --- incubator/lucene.net/trunk/test/contrib/Spatial/Prefix/TestRecursivePrefixTreeStrategy.cs (original) +++ incubator/lucene.net/trunk/test/contrib/Spatial/Prefix/TestRecursivePrefixTreeStrategy.cs Mon Aug 20 21:57:18 2012 @@ -21,7 +21,6 @@ using Lucene.Net.Documents; using Lucene.Net.Spatial.Prefix; using Lucene.Net.Spatial.Prefix.Tree; using Lucene.Net.Spatial.Queries; -using Lucene.Net.Spatial.Util; using NUnit.Framework; using Spatial4n.Core.Context; using Spatial4n.Core.Distance; @@ -47,6 +46,7 @@ namespace Lucene.Net.Contrib.Spatial.Tes [Test] public void testFilterWithVariableScanLevel() { + init(GeohashPrefixTree.GetMaxLevelsPossible()); getAddAndVerifyIndexedDocuments(DATA_WORLD_CITIES_POINTS); //execute queries for each prefix grid scan level Modified: incubator/lucene.net/trunk/test/contrib/Spatial/StrategyTestCase.cs URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Spatial/StrategyTestCase.cs?rev=1375269&r1=1375268&r2=1375269&view=diff ============================================================================== --- incubator/lucene.net/trunk/test/contrib/Spatial/StrategyTestCase.cs (original) +++ incubator/lucene.net/trunk/test/contrib/Spatial/StrategyTestCase.cs Mon Aug 20 21:57:18 2012 @@ -124,8 +124,9 @@ namespace Lucene.Net.Contrib.Spatial.Tes foreach (var r in got.results) { String id = r.document.Get("id"); - ids.MoveNext(); - Assert.AreEqual("out of order: " + msg, ids.Current, id); + if (!ids.MoveNext()) + Assert.Fail(msg + " :: Did not get enough results. Expected " + q.ids + ", got: " + got.numFound /*ToDebugString()*/); + Assert.AreEqual(ids.Current, id, "out of order: " + msg); } if (ids.MoveNext()) {