geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [geode] 02/02: removed unused connectionUrl parameter from TestConfigService also removed some schema experimentation code from test
Date Fri, 21 Dec 2018 18:37:14 GMT
This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch feature/GEODE-6225
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 205308d54e0278e641f089c94495c61feee1c63a
Author: Darrel Schneider <dschneider@pivotal.io>
AuthorDate: Fri Dec 21 10:35:57 2018 -0800

    removed unused connectionUrl parameter from TestConfigService
    also removed some schema experimentation code from test
---
 .../connectors/jdbc/JdbcAsyncWriterIntegrationTest.java |  2 +-
 .../connectors/jdbc/JdbcLoaderIntegrationTest.java      |  3 +--
 .../connectors/jdbc/JdbcWriterIntegrationTest.java      | 17 ++---------------
 .../connectors/jdbc/internal/TestConfigService.java     | 17 +++--------------
 4 files changed, 7 insertions(+), 32 deletions(-)

diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
index b7d6d38..1557890 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriterIntegrationTest.java
@@ -338,7 +338,7 @@ public abstract class JdbcAsyncWriterIntegrationTest {
   private SqlHandler createSqlHandler(String ids)
       throws RegionMappingExistsException {
     return new SqlHandler(new TableMetaDataManager(),
-        TestConfigService.getTestConfigService(getConnectionUrl(), ids),
+        TestConfigService.getTestConfigService(ids),
         testDataSourceFactory);
   }
 
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
index 241e2ee..54a4184 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcLoaderIntegrationTest.java
@@ -173,8 +173,7 @@ public abstract class JdbcLoaderIntegrationTest {
   private SqlHandler createSqlHandler(String pdxClassName, String ids)
       throws RegionMappingExistsException {
     return new SqlHandler(new TableMetaDataManager(),
-        TestConfigService.getTestConfigService((InternalCache) cache, pdxClassName,
-            getConnectionUrl(), ids),
+        TestConfigService.getTestConfigService((InternalCache) cache, pdxClassName, ids),
         testDataSourceFactory);
   }
 
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
index 5bc70e6..f78b988 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java
@@ -65,10 +65,7 @@ public abstract class JdbcWriterIntegrationTest {
 
     connection = getConnection();
     statement = connection.createStatement();
-    statement.execute("Create Schema mySchema");
-    //connection.setSchema("mySchema");
-    statement = connection.createStatement();
-    statement.execute("Create Table " + "mySchema." + REGION_TABLE_NAME
+    statement.execute("Create Table " + REGION_TABLE_NAME
         + " (id varchar(10) primary key not null, name varchar(10), age int)");
     pdx1 = cache.createPdxInstanceFactory(Employee.class.getName()).writeString("id", "1")
         .writeString("name", "Emp1")
@@ -78,15 +75,6 @@ public abstract class JdbcWriterIntegrationTest {
         .writeInt("age", 21).create();
     employee1 = (Employee) pdx1.getObject();
     employee2 = (Employee) pdx2.getObject();
-    
-    {
-    Connection connection2 = getConnection();
-    statement.execute("Create Schema mySchema2");
-    //connection2.setSchema("mySchema2");
-    statement = connection2.createStatement();
-    statement.execute("Create Table " + "mySchema2." + REGION_TABLE_NAME
-        + " (id varchar(10) primary key not null, name varchar(10), age int)");
-    }
   }
 
   private void setupRegion(String ids) throws RegionMappingExistsException {
@@ -110,7 +98,6 @@ public abstract class JdbcWriterIntegrationTest {
       }
     }
     if (statement != null) {
-      statement.execute("Drop table " + REGION_TABLE_NAME);
       statement.close();
     }
     if (connection != null) {
@@ -322,7 +309,7 @@ public abstract class JdbcWriterIntegrationTest {
   private SqlHandler createSqlHandler(String ids)
       throws RegionMappingExistsException {
     return new SqlHandler(new TableMetaDataManager(),
-        TestConfigService.getTestConfigService(getConnectionUrl(), ids),
+        TestConfigService.getTestConfigService(ids),
         testDataSourceFactory);
   }
 
diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
index 8d0bde2..0366196 100644
--- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
+++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java
@@ -29,24 +29,13 @@ public class TestConfigService {
   private static final String REGION_NAME = "employees";
   private static final String CONNECTION_CONFIG_NAME = "testConnectionConfig";
 
-  public static JdbcConnectorServiceImpl getTestConfigService(String connectionUrl)
+  public static JdbcConnectorServiceImpl getTestConfigService(String ids)
       throws RegionMappingExistsException {
-    return getTestConfigService(createMockCache(), null, connectionUrl);
-  }
-
-  public static JdbcConnectorServiceImpl getTestConfigService(String connectionUrl, String
ids)
-      throws RegionMappingExistsException {
-    return getTestConfigService(createMockCache(), null, connectionUrl, ids);
-  }
-
-  public static JdbcConnectorServiceImpl getTestConfigService(InternalCache cache,
-      String pdxClassName, String connectionUrl)
-      throws RegionMappingExistsException {
-    return getTestConfigService(cache, pdxClassName, connectionUrl, null);
+    return getTestConfigService(createMockCache(), null, ids);
   }
 
   public static JdbcConnectorServiceImpl getTestConfigService(InternalCache cache,
-      String pdxClassName, String connectionUrl, String ids)
+      String pdxClassName, String ids)
       throws RegionMappingExistsException {
 
     JdbcConnectorServiceImpl service = new JdbcConnectorServiceImpl();


Mime
View raw message