View | Details | Raw Unified | Return to bug 59803
Collapse All | Expand All

(-)src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java (-1 / +5 lines)
Lines 25-30 Link Here
25
import java.util.Set;
25
import java.util.Set;
26
26
27
import org.apache.commons.dbcp2.BasicDataSource;
27
import org.apache.commons.dbcp2.BasicDataSource;
28
import org.apache.commons.lang3.StringUtils;
28
import org.apache.jmeter.config.ConfigElement;
29
import org.apache.jmeter.config.ConfigElement;
29
import org.apache.jmeter.testbeans.TestBean;
30
import org.apache.jmeter.testbeans.TestBean;
30
import org.apache.jmeter.testbeans.TestBeanHelper;
31
import org.apache.jmeter.testbeans.TestBeanHelper;
Lines 209-215 Link Here
209
210
210
        if(isKeepAlive()) {
211
        if(isKeepAlive()) {
211
            dataSource.setTestWhileIdle(true);
212
            dataSource.setTestWhileIdle(true);
212
            dataSource.setValidationQuery(getCheckQuery());
213
            String validationQuery = getCheckQuery();
214
            if (!StringUtils.isBlank(validationQuery)) {
215
                dataSource.setValidationQuery(validationQuery);
216
            }
213
            dataSource.setSoftMinEvictableIdleTimeMillis(Long.parseLong(getConnectionAge()));
217
            dataSource.setSoftMinEvictableIdleTimeMillis(Long.parseLong(getConnectionAge()));
214
            dataSource.setTimeBetweenEvictionRunsMillis(Integer.parseInt(getTrimInterval()));
218
            dataSource.setTimeBetweenEvictionRunsMillis(Integer.parseInt(getTrimInterval()));
215
        }
219
        }

Return to bug 59803