mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 05:02:11 +08:00
SQOOP-2099: Sqoop2: Postgresql's detectRepositoryVersion uses wrong casing
(Abraham Elmahrek via Jarek Jarcec Cecho)
This commit is contained in:
parent
27a1044120
commit
8caa06103f
@ -79,8 +79,8 @@ public int detectRepositoryVersion(Connection conn) {
|
||||
try {
|
||||
DatabaseMetaData md = conn.getMetaData();
|
||||
metadataResultSet = md.getTables(null,
|
||||
CommonRepositorySchemaConstants.SCHEMA_SQOOP.toLowerCase(),
|
||||
CommonRepositorySchemaConstants.TABLE_SQ_SYSTEM_NAME.toLowerCase(), null);
|
||||
CommonRepositorySchemaConstants.SCHEMA_SQOOP,
|
||||
CommonRepositorySchemaConstants.TABLE_SQ_SYSTEM_NAME, null);
|
||||
|
||||
if (metadataResultSet.next()) {
|
||||
stmt = conn.prepareStatement(PostgresqlSchemaQuery.STMT_SELECT_SYSTEM);
|
||||
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.sqoop.integration.repository.postgresql;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Test connector methods on Derby repository.
|
||||
*/
|
||||
@Test(groups = "postgresql")
|
||||
public class TestHandler extends PostgresqlTestCase {
|
||||
|
||||
@Test
|
||||
public void testHasLatestRepositoryVersion() throws Exception {
|
||||
assertTrue(handler.isRepositorySuitableForUse(provider.getConnection()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDoubleUpdate() throws Exception {
|
||||
handler.createOrUpgradeRepository(provider.getConnection());
|
||||
assertTrue(handler.isRepositorySuitableForUse(provider.getConnection()));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user