From 2a337f559c805140fe4c54263ff95bdd823305ef Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 4 Oct 2010 14:05:01 +0000 Subject: [PATCH] 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 --- .../apache/lucene/xmlparser/TestQueryTemplateManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java b/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java index 0e4f4b96a12..44b8e64158b 100644 --- a/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java +++ b/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java @@ -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"));