From bcfb420558f5d0072becf3cd8c9aedfa269fee15 Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Sat, 26 Jul 2014 13:06:10 +0000 Subject: [PATCH] SOLR-6269 git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1613619 13f79535-47bb-0310-9956-ffa450edef68 --- .../dataimport/AbstractDIHJdbcTestCase.java | 19 ++++--------------- .../AbstractSqlEntityProcessorTestCase.java | 2 +- .../TestJdbcDataSourceConvertType.java | 2 +- .../dataimport/TestNestedChildren.java | 2 +- .../TestSimplePropertiesWriter.java | 2 +- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java index 396c7217116..9cb28396bfc 100644 --- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java +++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java @@ -74,7 +74,7 @@ public abstract class AbstractDIHJdbcTestCase extends @AfterClass public static void afterClassDihJdbcTest() throws Exception { try { - DriverManager.getConnection("jdbc:derby:;shutdown=true"); + DriverManager.getConnection("jdbc:derby:;shutdown=true;territory=en_US"); } catch (SQLException e) { // ignore...we might not even be using derby this time... } @@ -109,7 +109,7 @@ public abstract class AbstractDIHJdbcTestCase extends if (dbToUse == Database.DERBY) { try { conn = DriverManager - .getConnection("jdbc:derby:memory:derbyDB;drop=true"); + .getConnection("jdbc:derby:memory:derbyDB;drop=true;territory=en_US"); } catch (SQLException e) { if (!"08006".equals(e.getSQLState())) { throw e; @@ -136,7 +136,7 @@ public abstract class AbstractDIHJdbcTestCase extends protected Connection newConnection() throws Exception { if (dbToUse == Database.DERBY) { - return DriverManager.getConnection("jdbc:derby:memory:derbyDB;"); + return DriverManager.getConnection("jdbc:derby:memory:derbyDB;territory=en_US"); } else if (dbToUse == Database.HSQLDB) { return DriverManager.getConnection("jdbc:hsqldb:mem:."); } @@ -148,7 +148,7 @@ public abstract class AbstractDIHJdbcTestCase extends try { if (dbToUse == Database.DERBY) { conn = DriverManager - .getConnection("jdbc:derby:memory:derbyDB;create=true"); + .getConnection("jdbc:derby:memory:derbyDB;create=true;territory=en_US"); } else if (dbToUse == Database.HSQLDB) { conn = DriverManager.getConnection("jdbc:hsqldb:mem:."); } else { @@ -160,17 +160,6 @@ public abstract class AbstractDIHJdbcTestCase extends while(cause.getCause()!=null) { cause = cause.getCause(); } - String message = cause.getMessage(); - if(cause instanceof StandardException) { - message = ((StandardException) cause).getMessageId(); - } - //Derby INVALID_LOCALE_DESCRIPTION - if("XBM0X.D".equals(message)) { - log.warn("Skipping test because Database " + dbToUse + " does not support the locale " + Locale.getDefault()); - skipThisTest = true; - Assume.assumeNoException(sqe); - throw sqe; - } } finally { try { conn.close(); diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java index e4eb14e4046..7badb353356 100644 --- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java +++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java @@ -565,7 +565,7 @@ public abstract class AbstractSqlEntityProcessorTestCase extends sb.append("\n \n"); sb.append("\n"); sb.append(" \n"); - sb.append(" \n"); + sb.append(" \n"); sb.append(" \n"); sb.append("> flds = new ArrayList<>(); diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNestedChildren.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNestedChildren.java index a413b484449..dbc746b55ff 100644 --- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNestedChildren.java +++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNestedChildren.java @@ -32,7 +32,7 @@ public class TestNestedChildren extends AbstractDIHJdbcTestCase { protected String generateConfig() { StringBuilder sb = new StringBuilder(); sb.append(" \n"); - sb.append(" \n"); + sb.append(" \n"); sb.append(" \n"); sb.append("\n"); diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java index fdd97732436..0521b6162a8 100644 --- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java +++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java @@ -131,7 +131,7 @@ public class TestSimplePropertiesWriter extends AbstractDIHJdbcTestCase { String q = useJdbcEscapeSyntax ? "" : "'"; sb.append(" \n"); sb.append("\n"); - sb.append(" \n"); + sb.append(" \n"); sb.append(" \n"); sb.append("\n");