lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
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 GMT
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())
 					{



Mime
View raw message