lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [7/7] lucene-solr:jira/solr-8593: Merge branch 'master' into jira/solr-8593
Date Wed, 04 May 2016 22:22:12 GMT
Merge branch 'master' into jira/solr-8593


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4ea7f4ef
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4ea7f4ef
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4ea7f4ef

Branch: refs/heads/jira/solr-8593
Commit: 4ea7f4ef9b2f093aaf8032436aa58be020789ba3
Parents: 5d2994d 0a20dd4
Author: Kevin Risden <krisden@apache.org>
Authored: Wed May 4 17:21:54 2016 -0500
Committer: Kevin Risden <krisden@apache.org>
Committed: Wed May 4 17:21:54 2016 -0500

----------------------------------------------------------------------
 solr/CHANGES.txt                                |    2 +
 .../solr/cloud/TestCloudBackupRestore.java      |   11 +-
 .../solr/client/solrj/io/stream/SolrStream.java |    2 +-
 .../solrj/request/CollectionAdminRequest.java   |    4 +
 .../client/solrj/request/UpdateRequest.java     |   18 +-
 .../apache/solr/common/SolrInputDocument.java   |    6 +-
 .../solr/collection1/conf/schema-streaming.xml  |  605 --------
 .../collection1/conf/solrconfig-streaming.xml   |   51 -
 .../solr/configsets/streaming/conf/schema.xml   |  605 ++++++++
 .../configsets/streaming/conf/solrconfig.xml    |   51 +
 .../client/solrj/impl/CloudSolrClientTest.java  |  425 ++----
 .../solrj/io/graph/GraphExpressionTest.java     |  304 +---
 .../solr/client/solrj/io/graph/GraphTest.java   |  218 +--
 .../solr/client/solrj/io/sql/JdbcTest.java      |  171 +--
 .../client/solrj/io/stream/JDBCStreamTest.java  |  435 +++---
 .../solrj/io/stream/StreamExpressionTest.java   | 1406 ++++++++----------
 .../client/solrj/io/stream/StreamingTest.java   | 1048 ++++++-------
 17 files changed, 2323 insertions(+), 3039 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4ea7f4ef/solr/solrj/src/test/org/apache/solr/client/solrj/io/sql/JdbcTest.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/test/org/apache/solr/client/solrj/io/sql/JdbcTest.java
index 24828e5,8280eae..bdd9a0a
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/sql/JdbcTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/sql/JdbcTest.java
@@@ -32,11 -31,11 +31,12 @@@ import java.util.Properties
  
  import org.apache.lucene.util.LuceneTestCase;
  import org.apache.lucene.util.LuceneTestCase.Slow;
- import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
- import org.apache.solr.cloud.AbstractZkTestCase;
- import org.junit.After;
- import org.junit.AfterClass;
+ import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+ import org.apache.solr.client.solrj.request.UpdateRequest;
+ import org.apache.solr.cloud.AbstractDistribZkTestBase;
+ import org.apache.solr.cloud.SolrCloudTestCase;
  import org.junit.BeforeClass;
++import org.junit.Ignore;
  import org.junit.Test;
  
  /**
@@@ -393,11 -394,13 +395,14 @@@ public class JdbcTest extends SolrCloud
          }
        }
      }
+   }
+ 
++  @Ignore("Fix error checking")
+   @Test
+   public void testErrorPropagation() throws Exception {
  
-     // TODO fix error checking
-     /*
      //Test error propagation
-     props = new Properties();
+     Properties props = new Properties();
      props.put("aggregationMode", "facet");
      try (Connection con = DriverManager.getConnection("jdbc:solr://" + zkHost + "?collection=collection1",
props)) {
        try (Statement stmt = con.createStatement()) {
@@@ -409,15 -412,14 +414,13 @@@
          }
        }
      }
-     */
--
-     testDriverMetadata();
    }
  
-   private void testDriverMetadata() throws Exception {
-     String collection = DEFAULT_COLLECTION;
+   @Test
+   public void testDriverMetadata() throws Exception {
+     String collection = COLLECTION;
  
-     String connectionString1 = "jdbc:solr://" + zkServer.getZkAddress() + "?collection="
+ collection +
+     String connectionString1 = "jdbc:solr://" + zkHost + "?collection=" + collection +
          "&username=&password=&testKey1=testValue&testKey2";
      Properties properties1 = new Properties();
  
@@@ -469,34 -471,28 +472,34 @@@
  //      assertEquals(0, databaseMetaData.getDriverMajorVersion());
  //      assertEquals(0, databaseMetaData.getDriverMinorVersion());
  
 +      try(ResultSet rs = databaseMetaData.getSchemas()) {
 +        assertTrue(rs.next());
-         assertEquals(zkServer.getZkAddress(), rs.getString("tableSchem"));
++        assertEquals(zkHost, rs.getString("tableSchem"));
 +        assertNull(rs.getString("tableCat"));
 +        assertTrue(rs.next());
 +        assertEquals("metadata", rs.getString("tableSchem"));
 +        assertNull(rs.getString("tableCat"));
 +        assertFalse(rs.next());
 +      }
 +
        try(ResultSet rs = databaseMetaData.getCatalogs()) {
          assertTrue(rs.next());
 -        assertEquals(zkHost, rs.getString("TABLE_CAT"));
 +        assertNull(rs.getString("tableCat"));
          assertFalse(rs.next());
        }
  
        List<String> collections = new ArrayList<>();
-       collections.addAll(cloudClient.getZkStateReader().getClusterState().getCollections());
+       collections.addAll(cluster.getSolrClient().getZkStateReader().getClusterState().getCollections());
        Collections.sort(collections);
  
-       try(ResultSet rs = databaseMetaData.getTables(null, zkServer.getZkAddress(), "%",
null)) {
 -      try(ResultSet rs = databaseMetaData.getSchemas()) {
 -        assertFalse(rs.next());
 -      }
 -
 -      try(ResultSet rs = databaseMetaData.getTables(zkHost, null, "%", null)) {
++      try(ResultSet rs = databaseMetaData.getTables(null, zkHost, "%", null)) {
          for(String acollection : collections) {
            assertTrue(rs.next());
 -          assertEquals(zkHost, rs.getString("TABLE_CAT"));
 -          assertNull(rs.getString("TABLE_SCHEM"));
 -          assertEquals(acollection, rs.getString("TABLE_NAME"));
 -          assertEquals("TABLE", rs.getString("TABLE_TYPE"));
 -          assertNull(rs.getString("REMARKS"));
 +          assertNull(rs.getString("tableCat"));
-           assertEquals(zkServer.getZkAddress(), rs.getString("tableSchem"));
++          assertEquals(zkHost, rs.getString("tableSchem"));
 +          assertEquals(acollection, rs.getString("tableName"));
 +          assertEquals("TABLE", rs.getString("tableType"));
 +          assertNull(rs.getString("remarks"));
          }
          assertFalse(rs.next());
        }


Mime
View raw message