jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ago...@apache.org
Subject svn commit: r1807163 - in /jmeter/trunk: src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java xdocs/usermanual/component_reference.xml
Date Sun, 03 Sep 2017 19:30:56 GMT
Author: agomes
Date: Sun Sep  3 19:30:56 2017
New Revision: 1807163

URL: http://svn.apache.org/viewvc?rev=1807163&view=rev
Log:
Add a list for "JDBC Connection Configuration" "Validation Query" attribut. Felix remarks
2 implemented

Modified:
    jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java
    jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java?rev=1807163&r1=1807162&r2=1807163&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java
(original)
+++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java
Sun Sep  3 19:30:56 2017
@@ -91,7 +91,7 @@ public class DataSourceElementBeanInfo e
         p = property("checkQuery", TypeEditor.ComboStringEditor);
         p.setValue(NOT_UNDEFINED, Boolean.TRUE);
         p.setValue(DEFAULT, "");
-        p.setValue(TAGS, JOrphanUtils.split(JMeterUtils.getPropDefault("jdbc.config.check.query",
""), "|"));
+        p.setValue(TAGS, getListCheckQuery());
         p = property("dbUrl");
         p.setValue(NOT_UNDEFINED, Boolean.TRUE);
         p.setValue(DEFAULT, "");
@@ -145,4 +145,13 @@ public class DataSourceElementBeanInfo e
         return JOrphanUtils.split(JMeterUtils.getPropDefault("jdbc.config.jdbc.driver.class",
""), "|"); //$NON-NLS-1$
     }
 
+    /**
+     * Get the check queris for the main databases
+     * Based in https://stackoverflow.com/questions/10684244/dbcp-validationquery-for-different-databases
+     * @return a String[] with the list of check queries
+     */
+    private String[] getListCheckQuery() {
+        return JOrphanUtils.split(JMeterUtils.getPropDefault("jdbc.config.check.query", ""),
"|"); //$NON-NLS-1$
+    }
+
 }

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1807163&r1=1807162&r2=1807163&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sun Sep  3 19:30:56 2017
@@ -4033,11 +4033,11 @@ instead. (see figures 12 and 13).</p>
               <dt>hsqldb</dt><dd>select 1 from INFORMATION_SCHEMA.SYSTEM_USERS</dd>
               <dt>Oracle</dt><dd>select 1 from dual</dd>
               <dt>DB2</dt><dd>select 1 from sysibm.sysdummy1</dd>
-              <dt>mysql</dt><dd>select 1</dd>
-              <dt>microsoft SQL Server</dt><dd>select 1</dd>
-              <dt>postgresql</dt><dd>select 1</dd>
-              <dt>ingres</dt><dd>select 1</dd>
-              <dt>derby</dt><dd>values 1</dd>
+              <dt>MySQL</dt><dd>select 1</dd>
+              <dt>Microsoft SQL Server (MS JDBC driver)</dt><dd>select
1</dd>
+              <dt>PostgreSQL</dt><dd>select 1</dd>
+              <dt>Ingres</dt><dd>select 1</dd>
+              <dt>Derby</dt><dd>values 1</dd>
               <dt>H2</dt><dd>select 1</dd>
               <dt>Firebird</dt><dd>select 1 from rdb$database</dd>
             </dl>



Mime
View raw message