You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2010/10/04 16:05:01 UTC

svn commit: r1004241 - /lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java

Author: rmuir
Date: Mon Oct  4 14:05:01 2010
New Revision: 1004241

URL: http://svn.apache.org/viewvc?rev=1004241&view=rev
Log:
LUCENE-2685: add an assume for this test on broken sun jres

Modified:
    lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java

Modified: lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java?rev=1004241&r1=1004240&r2=1004241&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java (original)
+++ lucene/dev/trunk/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java Mon Oct  4 14:05:01 2010
@@ -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.IndexWrit
 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 ex
 	
 	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"));