From db55fe4eaccc7561adc62ff596a590e6a3c40367 Mon Sep 17 00:00:00 2001 From: haocao Date: Thu, 2 Aug 2018 14:00:57 +0800 Subject: [PATCH] for #601, refactor jdbc relative init sql files --- .../io/shardingsphere/core/common/base/AbstractSQLTest.java | 4 ++-- .../resources/integrate/{schema/table => jdbc}/jdbc_data.sql | 0 .../integrate/{schema/table/jdbc.sql => jdbc/jdbc_init.sql} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename sharding-jdbc/src/test/resources/integrate/{schema/table => jdbc}/jdbc_data.sql (100%) rename sharding-jdbc/src/test/resources/integrate/{schema/table/jdbc.sql => jdbc/jdbc_init.sql} (100%) diff --git a/sharding-jdbc/src/test/java/io/shardingsphere/core/common/base/AbstractSQLTest.java b/sharding-jdbc/src/test/java/io/shardingsphere/core/common/base/AbstractSQLTest.java index 0b33f0a37ad18..ceca41f7bc67b 100644 --- a/sharding-jdbc/src/test/java/io/shardingsphere/core/common/base/AbstractSQLTest.java +++ b/sharding-jdbc/src/test/java/io/shardingsphere/core/common/base/AbstractSQLTest.java @@ -69,7 +69,7 @@ private static void createJdbcSchema(final DatabaseType dbType) { Connection conn; for (int i = 0; i < 2; i++) { conn = initialConnection("jdbc_" + i, dbType); - RunScript.execute(conn, new InputStreamReader(AbstractSQLTest.class.getClassLoader().getResourceAsStream("integrate/schema/table/jdbc.sql"))); + RunScript.execute(conn, new InputStreamReader(AbstractSQLTest.class.getClassLoader().getResourceAsStream("integrate/jdbc/jdbc_init.sql"))); conn.close(); } } catch (final SQLException ex) { @@ -158,7 +158,7 @@ private static void closeDataSources(final Collection dataSources) t protected final void importDataSet() { try { ShardingConnection conn = shardingDataSource.getConnection(); - RunScript.execute(conn, new InputStreamReader(AbstractSQLTest.class.getClassLoader().getResourceAsStream("integrate/schema/table/jdbc_data.sql"))); + RunScript.execute(conn, new InputStreamReader(AbstractSQLTest.class.getClassLoader().getResourceAsStream("integrate/jdbc/jdbc_data.sql"))); conn.close(); } catch (final SQLException ex) { ex.printStackTrace(); diff --git a/sharding-jdbc/src/test/resources/integrate/schema/table/jdbc_data.sql b/sharding-jdbc/src/test/resources/integrate/jdbc/jdbc_data.sql similarity index 100% rename from sharding-jdbc/src/test/resources/integrate/schema/table/jdbc_data.sql rename to sharding-jdbc/src/test/resources/integrate/jdbc/jdbc_data.sql diff --git a/sharding-jdbc/src/test/resources/integrate/schema/table/jdbc.sql b/sharding-jdbc/src/test/resources/integrate/jdbc/jdbc_init.sql similarity index 100% rename from sharding-jdbc/src/test/resources/integrate/schema/table/jdbc.sql rename to sharding-jdbc/src/test/resources/integrate/jdbc/jdbc_init.sql