[tutti] branch develop updated (e17cba0 -> fe0fa0d)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository tutti. See http://git.codelutin.com/tutti.git from e17cba0 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 17c4da0 fix gitignore new fe0fa0d change the test data directory The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit fe0fa0dea7da9e5373219bd0d8b58ed681b26ce6 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Sep 12 12:27:02 2014 +0200 change the test data directory commit 17c4da0f88127fa779db1b7fb1c5e5194ddd2d1a Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Sep 12 12:24:00 2014 +0200 fix gitignore Summary of changes: .gitignore | 3 +- .../tutti/persistence/test/DatabaseResource.java | 86 +++++++++++----------- 2 files changed, 43 insertions(+), 46 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 17c4da0f88127fa779db1b7fb1c5e5194ddd2d1a Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Sep 12 12:24:00 2014 +0200 fix gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index df8591f..64dc679 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /*/*.ipr /*.iws /*/*.iws -/tutti-service/src/test/db* +/tutti-service/src/test/data +/tutti-persistence/src/test/data /*~ /*/*~ \ No newline at end of file -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit fe0fa0dea7da9e5373219bd0d8b58ed681b26ce6 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Sep 12 12:27:02 2014 +0200 change the test data directory --- .../tutti/persistence/test/DatabaseResource.java | 86 +++++++++++----------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/test/DatabaseResource.java b/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/test/DatabaseResource.java index eeed2fa..cae7f4e 100644 --- a/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/test/DatabaseResource.java +++ b/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/test/DatabaseResource.java @@ -72,10 +72,6 @@ public class DatabaseResource implements TestRule { public static long BUILD_TIMESTAMP = System.nanoTime(); -// private static ClassLoader oldClassLoader; -// -// protected RessourceClassLoader loader; - private File resourceDirectory; private TuttiConfiguration config; @@ -252,7 +248,7 @@ public class DatabaseResource implements TestRule { // check db exist in src/test/dbName - db = FileUtil.getFileFromPaths(new File("src"), "test", dbName); + db = FileUtil.getFileFromPaths(new File("src"), "test", "data", dbName); } else { // check config.dbDirectory exist @@ -324,7 +320,7 @@ public class DatabaseResource implements TestRule { } public void copyDb(File target, boolean readonly, Properties p) throws IOException { - File db = FileUtil.getFileFromPaths(new File("src"), "test", dbName); + File db = FileUtil.getFileFromPaths(new File("src"), "test","data", dbName); if (!db.exists()) { if (log.isWarnEnabled()) { @@ -415,45 +411,45 @@ public class DatabaseResource implements TestRule { } } - public Connection createEmptyDb(String dbDirectory, - String scriptDbname, - String dbName, - Properties p) throws IOException, SQLException { - File directory = getResourceDirectory(dbDirectory); - if (log.isInfoEnabled()) { - log.info("Create new db at " + directory); - } - addToDestroy(directory); - String jdbcUrl = Jdbcs.getJdbcUrl(directory, dbName); - String user = "SA"; - String password = ""; - - if (p != null) { - Jdbcs.fillConnectionProperties(p, jdbcUrl, user, password); - } - - File scriptFile = FileUtil.getFileFromPaths(new File("src"), "test", scriptDbname, "allegro.script"); - - Preconditions.checkNotNull("Could not find db script in configuration at " + scriptFile); - Preconditions.checkState(scriptFile.exists(), "Could not find db script at " + scriptFile); - - if (log.isInfoEnabled()) { - log.info("Will use create script: " + scriptFile); - } - Connection connection = Jdbcs.createConnection(jdbcUrl, user, password); - - if (log.isInfoEnabled()) { - log.info("Created connection at " + connection.getMetaData().getURL()); - } - - List<String> importScriptSql = getImportScriptSql(scriptFile); - for (String sql : importScriptSql) { - PreparedStatement statement = connection.prepareStatement(sql); - statement.execute(); - } - connection.commit(); - return connection; - } +// public Connection createEmptyDb(String dbDirectory, +// String scriptDbname, +// String dbName, +// Properties p) throws IOException, SQLException { +// File directory = getResourceDirectory(dbDirectory); +// if (log.isInfoEnabled()) { +// log.info("Create new db at " + directory); +// } +// addToDestroy(directory); +// String jdbcUrl = Jdbcs.getJdbcUrl(directory, dbName); +// String user = "SA"; +// String password = ""; +// +// if (p != null) { +// Jdbcs.fillConnectionProperties(p, jdbcUrl, user, password); +// } +// +// File scriptFile = FileUtil.getFileFromPaths(new File("src"), "test", scriptDbname, "allegro.script"); +// +// Preconditions.checkNotNull("Could not find db script in configuration at " + scriptFile); +// Preconditions.checkState(scriptFile.exists(), "Could not find db script at " + scriptFile); +// +// if (log.isInfoEnabled()) { +// log.info("Will use create script: " + scriptFile); +// } +// Connection connection = Jdbcs.createConnection(jdbcUrl, user, password); +// +// if (log.isInfoEnabled()) { +// log.info("Created connection at " + connection.getMetaData().getURL()); +// } +// +// List<String> importScriptSql = getImportScriptSql(scriptFile); +// for (String sql : importScriptSql) { +// PreparedStatement statement = connection.prepareStatement(sql); +// statement.execute(); +// } +// connection.commit(); +// return connection; +// } protected List<String> getImportScriptSql(File scriptFile) throws IOException { List<String> lines = Files.readLines(scriptFile, Charsets.UTF_8); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm