From 504938ec03d2d7d734753f9f3df430a0290abcdf Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 9 Nov 2012 00:34:42 +0000 Subject: [PATCH] remove bad assert git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1407328 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/search/TestShardSearching.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java b/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java index ac2588f7b3f..a657363dd04 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java @@ -244,8 +244,13 @@ public class TestShardSearching extends ShardSearchingTestBase { System.out.println(" searcher expired during search: " + see); see.printStackTrace(System.out); } - assert prevSearchState != null; - priorSearches.remove(prevSearchState); + // We can't do this in general: on a very slow + // computer it's possible the local searcher + // expires before we can finish our search: + // assert prevSearchState != null; + if (prevSearchState != null) { + priorSearches.remove(prevSearchState); + } } } } finally {