LUCENE-2685: add an assume for this test on broken sun jres

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1004241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-10-04 14:05:01 +00:00
parent 98621382be
commit 2a337f559c
1 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package org.apache.lucene.xmlparser;
import java.io.IOException;
import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
@ -14,7 +15,9 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.LuceneTestCase;
import org.junit.Assume;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@ -69,6 +72,11 @@ public class TestQueryTemplateManager extends LuceneTestCase {
public void testFormTransforms() throws SAXException, IOException, ParserConfigurationException, TransformerException, ParserException
{
// Sun 1.5 suffers from http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6240963
if (Constants.JAVA_VENDOR.startsWith("Sun") && Constants.JAVA_VERSION.startsWith("1.5")) {
String defLang = Locale.getDefault().getLanguage();
Assume.assumeTrue(!defLang.equals("tr") && !defLang.equals("az"));
}
//Cache all the query templates we will be referring to.
QueryTemplateManager qtm=new QueryTemplateManager();
qtm.addQueryTemplate("albumBooleanQuery", getClass().getResourceAsStream("albumBooleanQuery.xsl"));