Revision: 6210
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6210&view=rev
Author: manningr
Date: 2011-03-26 18:00:34 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Added new automated test for launching SQuirreL from the generic installer project, automatically connecting to an embedded derby database, shutting down after 20 seconds, and checking the log file for errors and exceptions. All testing-related profile information is kept below the target directory for build portability. The test is ignored by default, but can be trigger using
Modified Paths:
--------------
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ApplicationArguments.java
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IApplication.java
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrame.java
Added Paths:
-----------
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IShutdownTimer.java
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ShutdownTimer.java
trunk/sql12/installer/squirrelsql-other-installer/src/test/java/
trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/
trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/
trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/squirrel_sql/
trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/squirrel_sql/test/
trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/squirrel_sql/test/FindErrorsInLogIntegrationTest.java
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/DTproperties.xml
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23.xml
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23_treeStructure.xml
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLDrivers.xml
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/editWhereCols.xml
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/prefs.xml
trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/sql_history.xml
Modified: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java 2011-03-26 14:09:59 UTC (rev 6209)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -164,6 +164,8 @@
private PreLaunchHelperFactory preLaunchHelperFactory = new PreLaunchHelperFactoryImpl();
+ private IShutdownTimer _shutdownTimer = new ShutdownTimer();
+
/**
* Default ctor.
*/
@@ -212,7 +214,7 @@
/**
* Application is shutting down.
*/
- public boolean shutdown()
+ public boolean shutdown(boolean updateLaunchScript)
{
s_log.info(s_stringMgr.getString("Application.shutdown", Calendar.getInstance().getTime()));
@@ -229,7 +231,9 @@
SchemaInfoCacheSerializer.waitTillStoringIsDone();
- updateLaunchScript();
+ if (updateLaunchScript) {
+ updateLaunchScript();
+ }
String msg = s_stringMgr.getString("Application.shutdowncomplete", Calendar.getInstance().getTime());
s_log.info(msg);
@@ -492,6 +496,7 @@
*/
public void showErrorDialog(String msg)
{
+ s_log.error(msg);
new ErrorDialog(getMainFrame(), msg).setVisible(true);
}
@@ -503,6 +508,7 @@
*/
public void showErrorDialog(Throwable th)
{
+ s_log.error(th);
new ErrorDialog(getMainFrame(), th).setVisible(true);
}
@@ -516,6 +522,7 @@
*/
public void showErrorDialog(String msg, Throwable th)
{
+ s_log.error(msg, th);
new ErrorDialog(getMainFrame(), msg, th).setVisible(true);
}
@@ -795,6 +802,12 @@
updateCheckTimer = new UpdateCheckTimerImpl(this);
updateCheckTimer.start();
+
+ if (args.getShutdownTimerSeconds() != null) {
+ _shutdownTimer.setShutdownSeconds(args.getShutdownTimerSeconds());
+ _shutdownTimer.setApplication(this);
+ _shutdownTimer.start();
+ }
}
/**
@@ -1220,5 +1233,13 @@
public void setPreLaunchHelperFactory(PreLaunchHelperFactory preLaunchHelperFactory)
{
this.preLaunchHelperFactory = preLaunchHelperFactory;
+ }
+
+ /**
+ * @param shutdownTimer the _shutdownTimer to set
+ */
+ public void setShutdownTimer(IShutdownTimer shutdownTimer)
+ {
+ _shutdownTimer = shutdownTimer;
}
}
Modified: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ApplicationArguments.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ApplicationArguments.java 2011-03-26 14:09:59 UTC (rev 6209)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ApplicationArguments.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -71,6 +71,9 @@
"Provides tool-tips and highlighting of UI components for easy identification" };
String[] PLUGIN_LIST = { "pluginlist", "plugin-classpath-list",
"Specify a comma-delimited list of plugins to load from the CLASSPATH" };
+ String[] SHUTDOWN_TIMEOUT_SECONDS = { "s", "shutdown-timeout-seconds",
+ "Specify the number of seconds to allow the application to run before exiting the VM" };
+
}
/** Only instance of this class. */
@@ -97,8 +100,12 @@
/** Path for logging configuration file */
private String _loggingConfigFile = null;
+ /** List of plugins to load from the classloader */
private List<String> _pluginList = null;
+ /** Time in seconds to allow the application to run prior to exiting the VM */
+ private Integer _shutdownTimerSeconds = null;
+
/**
* Ctor specifying arguments from command line.
*
@@ -149,6 +156,9 @@
_pluginList = Collections.unmodifiableList(_pluginList);
}
}
+ if (_cmdLine.hasOption(IOptions.SHUTDOWN_TIMEOUT_SECONDS[0])) {
+ _shutdownTimerSeconds = Integer.parseInt(_cmdLine.getOptionValue(IOptions.SHUTDOWN_TIMEOUT_SECONDS[0]));
+ }
}
@@ -286,6 +296,10 @@
return _pluginList;
}
+ public Integer getShutdownTimerSeconds() {
+ return _shutdownTimerSeconds;
+ }
+
void printHelp()
{
HelpFormatter formatter = new HelpFormatter();
@@ -328,6 +342,9 @@
opt = createAnOptionWithArgument(IOptions.PLUGIN_LIST);
_options.addOption(opt);
+
+ opt = createAnOptionWithArgument(IOptions.SHUTDOWN_TIMEOUT_SECONDS);
+ _options.addOption(opt);
}
private Option createAnOption(String[] argInfo)
Modified: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IApplication.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IApplication.java 2011-03-26 14:09:59 UTC (rev 6209)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IApplication.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -207,8 +207,10 @@
/**
* Application shutdown processing.
+ *
+ * @param whether or not to update the launch script before shutdown.
*/
- boolean shutdown();
+ boolean shutdown(boolean updateLaunchScript);
/**
* Launches the specified url in the system default web-browser
Added: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IShutdownTimer.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IShutdownTimer.java (rev 0)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/IShutdownTimer.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,40 @@
+package net.sourceforge.squirrel_sql.client;
+
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+public interface IShutdownTimer
+{
+
+ /**
+ * Starts the timer.
+ */
+ void start();
+
+ /**
+ * @param shutdownSeconds the _shutdownSeconds to set
+ */
+ void setShutdownSeconds(int shutdownSeconds);
+
+ /**
+ * @param app the _app to set
+ */
+ void setApplication(IApplication app);
+
+}
\ No newline at end of file
Added: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ShutdownTimer.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ShutdownTimer.java (rev 0)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/ShutdownTimer.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,85 @@
+package net.sourceforge.squirrel_sql.client;
+
+import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
+import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
+
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/**
+ * Shutdown thread that can be used to shutdown the application after a certain number of seconds.
+ */
+public class ShutdownTimer implements Runnable, IShutdownTimer
+{
+
+ /** Logger for this class. */
+ private static ILogger s_log = LoggerController.createLogger(ShutdownTimer.class);
+
+ /** Number of seconds to wait before initiating shutdown */
+ private int _shutdownSeconds;
+
+ /** The app implementation that can perform a clean shutdown */
+ private IApplication _app;
+
+ public ShutdownTimer() {
+ }
+
+ /**
+ * @see net.sourceforge.squirrel_sql.client.IShutdownTimer#start()
+ */
+ public void start() {
+ Thread t = new Thread(this, "ShutdownTimerThread");
+ t.start();
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ Thread.sleep(_shutdownSeconds * 1000);
+ }
+ catch (InterruptedException e)
+ {
+ s_log.error("Shutdown timer thread was interrupted unexpectedly: "+e.getMessage(), e);
+ }
+
+ if (s_log.isInfoEnabled()) {
+ s_log.info("ShutdownTimer is shutting down the application");
+ }
+
+ System.exit(_app.shutdown(false) ? 0 : 1);
+ }
+
+ /**
+ * @see net.sourceforge.squirrel_sql.client.IShutdownTimer#setShutdownSeconds(int)
+ */
+ public void setShutdownSeconds(int shutdownSeconds)
+ {
+ _shutdownSeconds = shutdownSeconds;
+ }
+
+ /**
+ * @see net.sourceforge.squirrel_sql.client.IShutdownTimer#setApplication(net.sourceforge.squirrel_sql.client.IApplication)
+ */
+ public void setApplication(IApplication app)
+ {
+ _app = app;
+ }
+}
Modified: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrame.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrame.java 2011-03-26 14:09:59 UTC (rev 6209)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrame.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -134,7 +134,7 @@
public void dispose()
{
boolean shouldDispose = true;
- if (!_app.shutdown())
+ if (!_app.shutdown(true))
{
String msg = s_stringMgr.getString("MainFrame.errorOnClose");
shouldDispose = Dialogs.showYesNo(_app.getMainFrame(), msg);
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/squirrel_sql/test/FindErrorsInLogIntegrationTest.java
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/squirrel_sql/test/FindErrorsInLogIntegrationTest.java (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/java/net/sourceforge/squirrel_sql/test/FindErrorsInLogIntegrationTest.java 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,64 @@
+package net.sourceforge.squirrel_sql.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import net.sourceforge.squirrel_sql.fw.util.IOUtilities;
+import net.sourceforge.squirrel_sql.fw.util.IOUtilitiesImpl;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.internal.runners.JUnit4ClassRunner;
+import org.junit.runner.RunWith;
+
+/*
+ * Copyright (C) 2011 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+@RunWith(JUnit4ClassRunner.class)
+public class FindErrorsInLogIntegrationTest
+{
+
+ private final IOUtilities ioutils = new IOUtilitiesImpl();
+
+ private static final String LOG_FILE = "./target/test-classes/user-settings-dir/logs/squirrel-sql.log";
+
+ @Test
+ public void searchForLoggerErrors() throws IOException {
+
+ File logFile = new File(LOG_FILE);
+ if (!logFile.exists()) {
+ return;
+ }
+
+ List<String> lines = ioutils.getLinesFromFile(LOG_FILE, null);
+ for (String line : lines) {
+ if (line.contains("Exception")) {
+ Assert.fail("Detected an exception in log file ("+LOG_FILE+") : "+line);
+ }
+ if (line.contains("error") || line.contains("Error")) {
+ Assert.fail("Detected an error in log file ("+LOG_FILE+") : "+line);
+ }
+
+ }
+
+ }
+
+
+}
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/DTproperties.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/DTproperties.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/DTproperties.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,90 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DTProperties">
+ <dataArray Indexed="true">
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTime useJavaDefaultFormat=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTime lenient=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTime localeFormat=3</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeString limitReadColumnNames=</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeString limitRead=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeString limitReadOnSpecificColumns=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeString limitReadLength=100</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeString useLongInWhere=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeString makeNewlinesVisibleInCell=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeClob readClobsSize=255</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeClob readCompleteClobs=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeClob makeNewlinesVisibleInCell=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeClob readClobs=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeBlob readBlobs=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeBlob readCompleteBlobs=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeBlob readBlobsSize=255</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTimestamp whereClauseUsage=1</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTimestamp useJavaDefaultFormat=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTimestamp lenient=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeTimestamp localeFormat=3</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeOther readSQLOther=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeUnknown readUnknown=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeBigDecimal useJavaDefaultFormat=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeGeneral useColumnLabelInsteadColumnName=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeDate readDateAsTimestamp=false</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeDate useJavaDefaultFormat=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeDate lenient=true</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeDate localeFormat=3</string>
+ </Bean>
+ </dataArray>
+ </Bean>
+</Beans>
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,40 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.client.gui.db.SQLAlias">
+ <autoLogon>true</autoLogon>
+ <colorProperties Class="net.sourceforge.squirrel_sql.client.gui.db.SQLAliasColorProperties">
+ <objectTreeBackgroundColorRgbValue>0</objectTreeBackgroundColorRgbValue>
+ <overrideObjectTreeBackgroundColor>false</overrideObjectTreeBackgroundColor>
+ <overrideStatusBarBackgroundColor>false</overrideStatusBarBackgroundColor>
+ <overrideToolbarBackgroundColor>false</overrideToolbarBackgroundColor>
+ <statusBarBackgroundColorRgbValue>0</statusBarBackgroundColorRgbValue>
+ <toolbarBackgroundColorRgbValue>0</toolbarBackgroundColorRgbValue>
+ </colorProperties>
+ <connectAtStartup>true</connectAtStartup>
+ <connectionProperties Class="net.sourceforge.squirrel_sql.client.gui.db.SQLAliasConnectionProperties">
+ <enableConnectionKeepAlive>false</enableConnectionKeepAlive>
+ <keepAliveSleepTimeSeconds>120</keepAliveSleepTimeSeconds>
+ <keepAliveSqlStatement/>
+ </connectionProperties>
+ <driverIdentifier Class="net.sourceforge.squirrel_sql.fw.id.UidIdentifier">
+ <string>-30</string>
+ </driverIdentifier>
+ <driverProperties Class="net.sourceforge.squirrel_sql.fw.sql.SQLDriverPropertyCollection">
+ <driverProperties Indexed="true"/>
+ </driverProperties>
+ <identifier Class="net.sourceforge.squirrel_sql.fw.id.UidIdentifier">
+ <string>-62d3f2cb:12e932b04b0:-7f68</string>
+ </identifier>
+ <name>testdb</name>
+ <password/>
+ <schemaProperties Class="net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaProperties">
+ <allSchemaProceduresNotToBeCached Indexed="true"/>
+ <cacheSchemaIndependentMetaData>false</cacheSchemaIndependentMetaData>
+ <expectsSomeCachedData>false</expectsSomeCachedData>
+ <globalState>0</globalState>
+ <schemaDetails Indexed="true"/>
+ </schemaProperties>
+ <url>jdbc:derby:${project.build.directory}/derbydb;create=true</url>
+ <useDriverProperties>false</useDriverProperties>
+ <userName>sa</userName>
+ </Bean>
+</Beans>
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23_treeStructure.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23_treeStructure.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLAliases23_treeStructure.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,19 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.client.gui.db.AliasFolderState">
+ <aliasIdentifier/>
+ <expanded>true</expanded>
+ <folderName>JTree</folderName>
+ <kids Indexed="true">
+ <Bean Class="net.sourceforge.squirrel_sql.client.gui.db.AliasFolderState">
+ <aliasIdentifier Class="net.sourceforge.squirrel_sql.fw.id.UidIdentifier">
+ <string>-62d3f2cb:12e932b04b0:-7f68</string>
+ </aliasIdentifier>
+ <expanded>false</expanded>
+ <folderName/>
+ <kids Indexed="true"/>
+ <selected>true</selected>
+ </Bean>
+ </kids>
+ <selected>false</selected>
+ </Bean>
+</Beans>
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLDrivers.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLDrivers.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/SQLDrivers.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,35 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.sql.SQLDriver">
+ <driverClassName>org.apache.derby.jdbc.EmbeddedDriver</driverClassName>
+ <identifier Class="net.sourceforge.squirrel_sql.fw.id.UidIdentifier">
+ <string>-30</string>
+ </identifier>
+ <jarFileName/>
+ <jarFileNames Indexed="true">
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>${project.build.directory}/derby-driver/derby.jar</string>
+ </Bean>
+ </jarFileNames>
+ <name>Apache Derby Embedded</name>
+ <url>jdbc:derby:<database>[;create=true]</url>
+ <websiteUrl>http://db.apache.org/derby</websiteUrl>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.sql.SQLDriver">
+ <driverClassName>org.firebirdsql.jdbc.FBDriver</driverClassName>
+ <identifier Class="net.sourceforge.squirrel_sql.fw.id.UidIdentifier">
+ <string>-28</string>
+ </identifier>
+ <jarFileName/>
+ <jarFileNames Indexed="true">
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>${project.build.directory}/firebird-driver/jaybird-jdk16.jar</string>
+ </Bean>
+ <Bean Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.StringWrapper">
+ <string>${project.build.directory}/firebird-driver/geronimo-spec-j2ee-connector.jar</string>
+ </Bean>
+ </jarFileNames>
+ <name>Firebird JayBird</name>
+ <url>jdbc:firebirdsql:[//host[:port]/]<database></url>
+ <websiteUrl>http://www.firebirdsql.org</websiteUrl>
+ </Bean>
+</Beans>
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/editWhereCols.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/editWhereCols.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/editWhereCols.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,5 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.client.session.properties.EditWhereCols">
+ <dataArray Indexed="true"/>
+ </Bean>
+</Beans>
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/prefs.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/prefs.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/prefs.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,137 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences">
+ <actionKeys Indexed="true"/>
+ <confirmSessionClose>false</confirmSessionClose>
+ <fileOpenInPreviousDir>true</fileOpenInPreviousDir>
+ <fileOpenInSpecifiedDir>false</fileOpenInSpecifiedDir>
+ <filePreviousdDir>/tmp</filePreviousdDir>
+ <fileSpecifiedDir/>
+ <firstRun>false</firstRun>
+ <getUseScrollableTabbedPanes>false</getUseScrollableTabbedPanes>
+ <jdbcDebugtype>0</jdbcDebugtype>
+ <largeScriptStmtCount>200</largeScriptStmtCount>
+ <loginTimeout>30</loginTimeout>
+ <mainFrameWindowState Class="net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState">
+ <aliasesWindowState Class="net.sourceforge.squirrel_sql.fw.gui.WindowState">
+ <bounds Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.RectangleWrapper">
+ <height>400</height>
+ <width>600</width>
+ <x>0</x>
+ <y>0</y>
+ </bounds>
+ <frameExtendedState>0</frameExtendedState>
+ <visible>true</visible>
+ </aliasesWindowState>
+ <bounds Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.RectangleWrapper">
+ <height>733</height>
+ <width>1103</width>
+ <x>766</x>
+ <y>403</y>
+ </bounds>
+ <driversWindowState Class="net.sourceforge.squirrel_sql.fw.gui.WindowState">
+ <bounds Class="net.sourceforge.squirrel_sql.fw.util.beanwrapper.RectangleWrapper">
+ <height>400</height>
+ <width>600</width>
+ <x>0</x>
+ <y>0</y>
+ </bounds>
+ <frameExtendedState>0</frameExtendedState>
+ <visible>true</visible>
+ </driversWindowState>
+ <frameExtendedState>0</frameExtendedState>
+ <visible>true</visible>
+ </mainFrameWindowState>
+ <maximizeSessionSheetOnOpen>false</maximizeSessionSheetOnOpen>
+ <newSessionView/>
+ <pluginStatuses Indexed="true"/>
+ <preferredLocale>en_US</preferredLocale>
+ <proxyPerferences Class="net.sourceforge.squirrel_sql.fw.util.ProxySettings">
+ <httpNonProxyHosts/>
+ <httpProxyPassword/>
+ <httpProxyPort/>
+ <httpProxyServer/>
+ <httpProxyUser/>
+ <httpUseProxy>false</httpUseProxy>
+ <socksProxyPort/>
+ <socksProxyServer/>
+ <socksUseProxy>false</socksUseProxy>
+ </proxyPerferences>
+ <savePreferencesImmediately>true</savePreferencesImmediately>
+ <selectOnRightMouseClick>true</selectOnRightMouseClick>
+ <sessionProperties Class="net.sourceforge.squirrel_sql.client.session.properties.SessionProperties">
+ <abortOnError>true</abortOnError>
+ <autoCommit>true</autoCommit>
+ <catalogFilterExclude/>
+ <catalogFilterInclude/>
+ <commitOnClosingConnection>false</commitOnClosingConnection>
+ <contentsLimitRows>true</contentsLimitRows>
+ <contentsNbrOfRowsToShow>100</contentsNbrOfRowsToShow>
+ <fontInfo Class="net.sourceforge.squirrel_sql.fw.gui.FontInfo">
+ <family>Monospaced</family>
+ <isBold>false</isBold>
+ <isItalic>false</isItalic>
+ <size>12</size>
+ </fontInfo>
+ <keepTableLayoutOnRerun>false</keepTableLayoutOnRerun>
+ <limitSqlEntryHistorySize>true</limitSqlEntryHistorySize>
+ <limitSqlResultTabs>true</limitSqlResultTabs>
+ <loadCatalogsSchemas>true</loadCatalogsSchemas>
+ <loadColumnsInBackground>false</loadColumnsInBackground>
+ <mainTabPlacement>1</mainTabPlacement>
+ <metaDataOutputClassName>net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerTablePanel</metaDataOutputClassName>
+ <objectFilterExclude/>
+ <objectFilterInclude/>
+ <objectTabPlacement>1</objectTabPlacement>
+ <removeMultiLineComment>true</removeMultiLineComment>
+ <schemaFilterExclude/>
+ <schemaFilterInclude/>
+ <showResultsMetaData>true</showResultsMetaData>
+ <showRowCount>false</showRowCount>
+ <showToolBar>true</showToolBar>
+ <sqlEntryHistorySize>100</sqlEntryHistorySize>
+ <sqlExecutionTabPlacement>1</sqlExecutionTabPlacement>
+ <sqlFetchSize>false</sqlFetchSize>
+ <sqlLimitRows>true</sqlLimitRows>
+ <sqlNbrOfRowsToShow>100</sqlNbrOfRowsToShow>
+ <sqlResultTabLimit>15</sqlResultTabLimit>
+ <sqlResultsOutputClassName>net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerTablePanel</sqlResultsOutputClassName>
+ <sqlResultsTabPlacement>1</sqlResultsTabPlacement>
+ <sqlShareHistory>true</sqlShareHistory>
+ <sqlStartOfLineComment>--</sqlStartOfLineComment>
+ <sqlStatementSeparatorString>;</sqlStatementSeparatorString>
+ <sqlUseFetchSize>50</sqlUseFetchSize>
+ <tableContentsOutputClassName>net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerTablePanel</tableContentsOutputClassName>
+ </sessionProperties>
+ <showAliasesToolBar>true</showAliasesToolBar>
+ <showColorIconsInToolbars>true</showColorIconsInToolbars>
+ <showContentsWhenDragging>false</showContentsWhenDragging>
+ <showDebugLogMessages>true</showDebugLogMessages>
+ <showDriversToolBar>true</showDriversToolBar>
+ <showErrorLogMessages>true</showErrorLogMessages>
+ <showInfoLogMessages>true</showInfoLogMessages>
+ <showLoadedDriversOnly>false</showLoadedDriversOnly>
+ <showMainStatusBar>true</showMainStatusBar>
+ <showMainToolBar>true</showMainToolBar>
+ <showPleaseWaitDialog>false</showPleaseWaitDialog>
+ <showPluginFilesInSplashScreen>false</showPluginFilesInSplashScreen>
+ <showSessionStartupTimeHint>false</showSessionStartupTimeHint>
+ <showTabbedStyleHint>true</showTabbedStyleHint>
+ <showToolTips>true</showToolTips>
+ <tabbedStyle>true</tabbedStyle>
+ <updatePreferences Class="net.sourceforge.squirrel_sql.client.preferences.UpdateSettings">
+ <enableAutomaticUpdates>false</enableAutomaticUpdates>
+ <fileSystemUpdatePath/>
+ <lastUpdateCheckTimeMillis>0</lastUpdateCheckTimeMillis>
+ <remoteUpdateSite>true</remoteUpdateSite>
+ <updateCheckFrequency>WEEKLY</updateCheckFrequency>
+ <updateServer>www.squirrel-sql.net</updateServer>
+ <updateServerChannel>STABLE</updateServerChannel>
+ <updateServerPath>updates</updateServerPath>
+ <updateServerPort>80</updateServerPort>
+ </updatePreferences>
+ <useScrollableTabbedPanesForSessionTabs>false</useScrollableTabbedPanesForSessionTabs>
+ <warnForUnsavedBufferEdits>false</warnForUnsavedBufferEdits>
+ <warnForUnsavedFileEdits>false</warnForUnsavedFileEdits>
+ <warnJreJdbcMismatch>false</warnJreJdbcMismatch>
+ </Bean>
+</Beans>
Added: trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/sql_history.xml
===================================================================
--- trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/sql_history.xml (rev 0)
+++ trunk/sql12/installer/squirrelsql-other-installer/src/test/resources/user-settings-dir/sql_history.xml 2011-03-26 18:00:34 UTC (rev 6210)
@@ -0,0 +1,5 @@
+<Beans>
+ <Bean Class="net.sourceforge.squirrel_sql.client.session.mainpanel.SQLHistory">
+ <data Indexed="true"/>
+ </Bean>
+</Beans>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|