sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-2099: Sqoop2: Postgresql's detectRepositoryVersion uses wrong casing
Date Thu, 12 Feb 2015 02:42:19 GMT
Repository: sqoop
Updated Branches:
  refs/heads/branch-1.99.5 27a104412 -> 8caa06103


SQOOP-2099: Sqoop2: Postgresql's detectRepositoryVersion uses wrong casing

(Abraham Elmahrek via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/8caa0610
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/8caa0610
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/8caa0610

Branch: refs/heads/branch-1.99.5
Commit: 8caa06103f2c13793df34df968686ded3471ddff
Parents: 27a1044
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Wed Feb 11 18:18:31 2015 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Wed Feb 11 18:42:12 2015 -0800

----------------------------------------------------------------------
 .../postgresql/PostgresqlRepositoryHandler.java |  4 +-
 .../repository/postgresql/TestHandler.java      | 40 ++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/8caa0610/repository/repository-postgresql/src/main/java/org/apache/sqoop/repository/postgresql/PostgresqlRepositoryHandler.java
----------------------------------------------------------------------
diff --git a/repository/repository-postgresql/src/main/java/org/apache/sqoop/repository/postgresql/PostgresqlRepositoryHandler.java
b/repository/repository-postgresql/src/main/java/org/apache/sqoop/repository/postgresql/PostgresqlRepositoryHandler.java
index f54bd22..5ecc53a 100644
--- a/repository/repository-postgresql/src/main/java/org/apache/sqoop/repository/postgresql/PostgresqlRepositoryHandler.java
+++ b/repository/repository-postgresql/src/main/java/org/apache/sqoop/repository/postgresql/PostgresqlRepositoryHandler.java
@@ -79,8 +79,8 @@ public class PostgresqlRepositoryHandler extends CommonRepositoryHandler
{
     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);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8caa0610/repository/repository-postgresql/src/test/java/org/apache/sqoop/integration/repository/postgresql/TestHandler.java
----------------------------------------------------------------------
diff --git a/repository/repository-postgresql/src/test/java/org/apache/sqoop/integration/repository/postgresql/TestHandler.java
b/repository/repository-postgresql/src/test/java/org/apache/sqoop/integration/repository/postgresql/TestHandler.java
new file mode 100644
index 0000000..288e403
--- /dev/null
+++ b/repository/repository-postgresql/src/test/java/org/apache/sqoop/integration/repository/postgresql/TestHandler.java
@@ -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()));
+  }
+}


Mime
View raw message