"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "solr/solrj/src/test/org/apache/solr/client/solrj/io/sql/JdbcTest.java" between
solr-8.4.0-src.tgz and solr-8.4.1-src.tgz

About: Solr is the search platform from the Apache Lucene project. Its major features include full-text search, hit highlighting, faceted search, caching, replication, and a web admin interface.

JdbcTest.java  (solr-8.4.0-src.tgz):JdbcTest.java  (solr-8.4.1-src.tgz)
skipping to change at line 553 skipping to change at line 553
try(ResultSet rs = databaseMetaData.getCatalogs()) { try(ResultSet rs = databaseMetaData.getCatalogs()) {
assertTrue(rs.next()); assertTrue(rs.next());
assertNull(rs.getString("tableCat")); assertNull(rs.getString("tableCat"));
assertFalse(rs.next()); assertFalse(rs.next());
} }
CloudSolrClient solrClient = cluster.getSolrClient(); CloudSolrClient solrClient = cluster.getSolrClient();
solrClient.connect(); solrClient.connect();
ZkStateReader zkStateReader = solrClient.getZkStateReader(); ZkStateReader zkStateReader = solrClient.getZkStateReader();
SortedSet<String> tables = new TreeSet<>();
Set<String> collectionsSet = zkStateReader.getClusterState().getCollection sMap().keySet(); Set<String> collectionsSet = zkStateReader.getClusterState().getCollection sMap().keySet();
tables.addAll(collectionsSet); SortedSet<String> tables = new TreeSet<>(collectionsSet);
Aliases aliases = zkStateReader.getAliases(); Aliases aliases = zkStateReader.getAliases();
tables.addAll(aliases.getCollectionAliasListMap().keySet()); tables.addAll(aliases.getCollectionAliasListMap().keySet());
try(ResultSet rs = databaseMetaData.getTables(null, zkHost, "%", null)) { try(ResultSet rs = databaseMetaData.getTables(null, zkHost, "%", null)) {
for(String table : tables) { for(String table : tables) {
assertTrue(rs.next()); assertTrue(rs.next());
assertNull(rs.getString("tableCat")); assertNull(rs.getString("tableCat"));
assertEquals(zkHost, rs.getString("tableSchem")); assertEquals(zkHost, rs.getString("tableSchem"));
assertEquals(table, rs.getString("tableName")); assertEquals(table, rs.getString("tableName"));
assertEquals("TABLE", rs.getString("tableType")); assertEquals("TABLE", rs.getString("tableType"));
assertNull(rs.getString("remarks")); assertNull(rs.getString("remarks"));
} }
assertFalse(rs.next()); assertFalse(rs.next());
} }
assertEquals(Connection.TRANSACTION_NONE, con.getTransactionIsolation());
try {
con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
fail("should not have been able to set transaction isolation");
} catch (SQLException e) {
assertEquals(UnsupportedOperationException.class, e.getCause().getClass(
));
}
assertEquals(Connection.TRANSACTION_NONE, con.getTransactionIsolation());
assertTrue(con.isReadOnly()); assertTrue(con.isReadOnly());
con.setReadOnly(true); con.setReadOnly(true);
assertTrue(con.isReadOnly()); assertTrue(con.isReadOnly());
assertNull(con.getWarnings()); assertNull(con.getWarnings());
con.clearWarnings(); con.clearWarnings();
assertNull(con.getWarnings()); assertNull(con.getWarnings());
try (Statement statement = con.createStatement()) { try (Statement statement = con.createStatement()) {
checkStatement(con, statement); checkStatement(con, statement);
 End of changes. 3 change blocks. 
3 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)