incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Nalley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CLOUDSTACK-1060) Unit tests that require DB access should not be enabled by default
Date Thu, 24 Jan 2013 23:19:12 GMT
David Nalley created CLOUDSTACK-1060:
----------------------------------------

             Summary: Unit tests that require DB access should not be enabled by default
                 Key: CLOUDSTACK-1060
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1060
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Test
            Reporter: David Nalley


GlobalLockTest should be disabled by default. It unnecessarily consumes 10 seconds of time,
and tosses an exception, because there is no DB. 

Running com.cloud.utils.db.GlobalLockTest
Configure log4j with default properties
2013-01-24 20:19:30,504 WARN  [db.Transaction.Transaction] (Thread-1:) Unable to load db configuration,
using defaults with 5 connections.  Please check your configuration
java.io.FileNotFoundException: file:/home/jenkins/jenkins-slave/workspace/cloudstack-master-maven/utils/target/cloud-utils-4.1.0-SNAPSHOT-tests.jar!/db.properties
(No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at com.cloud.utils.db.Transaction.<clinit>(Transaction.java:1010)
	at com.cloud.utils.db.DbUtil.getConnectionForGlobalLocks(DbUtil.java:59)
	at com.cloud.utils.db.DbUtil.getGlobalLock(DbUtil.java:204)
	at com.cloud.utils.db.GlobalLock.lock(GlobalLock.java:154)
	at com.cloud.utils.db.GlobalLockTest$Worker.run(GlobalLockTest.java:43)
	at java.lang.Thread.run(Thread.java:662)
2013-01-24 20:19:30,676 ERROR [db.Transaction.Transaction] (Thread-1:) Unexpected exception:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
received any packets from the server.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2393)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.cloud.utils.db.Transaction.getStandaloneConnectionWithException(Transaction.java:200)
	at com.cloud.utils.db.Transaction.getStandaloneConnection(Transaction.java:209)
	at com.cloud.utils.db.DbUtil.getConnectionForGlobalLocks(DbUtil.java:59)
	at com.cloud.utils.db.DbUtil.getGlobalLock(DbUtil.java:204)
	at com.cloud.utils.db.GlobalLock.lock(GlobalLock.java:154)
	at com.cloud.utils.db.GlobalLockTest$Worker.run(GlobalLockTest.java:43)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	... 31 more
2013-01-24 20:19:30,677 ERROR [utils.db.DbUtil] (Thread-1:) Unable to acquire DB connection
for global lock system
Thread 0 waited 259 ms, locked=false
Thread 2 waited 5001 ms, locked=false
Thread 7 waited 5001 ms, locked=false
Thread 4 waited 5001 ms, locked=false
Thread 1 waited 5001 ms, locked=false
2013-01-24 20:19:35,421 ERROR [db.Transaction.Transaction] (Thread-6:) Unexpected exception:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
received any packets from the server.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2393)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.cloud.utils.db.Transaction.getStandaloneConnectionWithException(Transaction.java:200)
	at com.cloud.utils.db.Transaction.getStandaloneConnection(Transaction.java:209)
	at com.cloud.utils.db.DbUtil.getConnectionForGlobalLocks(DbUtil.java:59)
	at com.cloud.utils.db.DbUtil.getGlobalLock(DbUtil.java:204)
	at com.cloud.utils.db.GlobalLock.lock(GlobalLock.java:154)
	at com.cloud.utils.db.GlobalLockTest$Worker.run(GlobalLockTest.java:43)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	... 31 more
2013-01-24 20:19:35,422 ERROR [utils.db.DbUtil] (Thread-6:) Unable to acquire DB connection
for global lock system
Thread 5 waited 5004 ms, locked=false
Thread 12 waited 5001 ms, locked=false
Thread 33 waited 5002 ms, locked=false
Thread 36 waited 5002 ms, locked=false
Thread 29 waited 5004 ms, locked=false
Thread 45 waited 5001 ms, locked=false
Thread 35 waited 5002 ms, locked=false
Thread 47 waited 5001 ms, locked=false
Thread 30 waited 5003 ms, locked=false
Thread 39 waited 5002 ms, locked=false
Thread 32 waited 5003 ms, locked=false
Thread 46 waited 5002 ms, locked=false
Thread 34 waited 5002 ms, locked=false
Thread 41 waited 5002 ms, locked=false
Thread 43 waited 5001 ms, locked=false
Thread 14 waited 5005 ms, locked=false
Thread 16 waited 5005 ms, locked=false
Thread 42 waited 5002 ms, locked=false
Thread 37 waited 5002 ms, locked=false
Thread 28 waited 5003 ms, locked=false
Thread 17 waited 5005 ms, locked=false
Thread 31 waited 5003 ms, locked=false
Thread 15 waited 5005 ms, locked=false
Thread 20 waited 5006 ms, locked=false
Thread 22 waited 5005 ms, locked=false
Thread 18 waited 5006 ms, locked=false
Thread 24 waited 5005 ms, locked=false
Thread 26 waited 5005 ms, locked=false
Thread 19 waited 5006 ms, locked=false
Thread 21 waited 5007 ms, locked=false
Thread 44 waited 5004 ms, locked=false
Thread 23 waited 5006 ms, locked=false
Thread 25 waited 5006 ms, locked=false
Thread 40 waited 5005 ms, locked=false
Thread 27 waited 5006 ms, locked=false
Thread 38 waited 5005 ms, locked=false
2013-01-24 20:19:35,435 ERROR [db.Transaction.Transaction] (Thread-9:) Unexpected exception:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
received any packets from the server.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2393)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.cloud.utils.db.Transaction.getStandaloneConnectionWithException(Transaction.java:200)
	at com.cloud.utils.db.Transaction.getStandaloneConnection(Transaction.java:209)
	at com.cloud.utils.db.DbUtil.getConnectionForGlobalLocks(DbUtil.java:59)
	at com.cloud.utils.db.DbUtil.getGlobalLock(DbUtil.java:204)
	at com.cloud.utils.db.GlobalLock.lock(GlobalLock.java:154)
	at com.cloud.utils.db.GlobalLockTest$Worker.run(GlobalLockTest.java:43)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	... 31 more
2013-01-24 20:19:35,436 ERROR [utils.db.DbUtil] (Thread-9:) Unable to acquire DB connection
for global lock system
Thread 8 waited 5010 ms, locked=false
2013-01-24 20:19:35,440 ERROR [db.Transaction.Transaction] (Thread-49:) Unexpected exception:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
received any packets from the server.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2393)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.cloud.utils.db.Transaction.getStandaloneConnectionWithException(Transaction.java:200)
	at com.cloud.utils.db.Transaction.getStandaloneConnection(Transaction.java:209)
	at com.cloud.utils.db.DbUtil.getConnectionForGlobalLocks(DbUtil.java:59)
	at com.cloud.utils.db.DbUtil.getGlobalLock(DbUtil.java:204)
	at com.cloud.utils.db.GlobalLock.lock(GlobalLock.java:154)
	at com.cloud.utils.db.GlobalLockTest$Worker.run(GlobalLockTest.java:43)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	... 31 more
2013-01-24 20:19:35,441 ERROR [utils.db.DbUtil] (Thread-49:) Unable to acquire DB connection
for global lock system
Thread 48 waited 5004 ms, locked=false
Thread 6 waited 10001 ms, locked=false
Thread 3 waited 10001 ms, locked=false
Thread 9 waited 10000 ms, locked=false
Thread 11 waited 10001 ms, locked=false
Thread 10 waited 10000 ms, locked=false
Thread 49 waited 10000 ms, locked=false
Thread 13 waited 10004 ms, locked=false
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.148 sec

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message