Mercurial > hg > ltpda
changeset 50:7d2e2e065cf1 database-connection-manager
Update unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:37 +0100 |
parents | 0bcdf74587d1 |
children | 9d5c88356247 |
files | testing/utp_1.1/utp_fcns/utpCloseConnection.m testing/utp_1.1/utp_fcns/utpGetConnection.m testing/utp_1.1/utp_fcns/utpGetConnectionPlist.m testing/utp_1.1/utps/ao/utp_ao_bsubmit.m testing/utp_1.1/utps/ao/utp_ao_submit.m testing/utp_1.1/utps/ao/utp_ao_update.m |
diffstat | 6 files changed, 6 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/testing/utp_1.1/utp_fcns/utpCloseConnection.m Wed Dec 07 17:24:36 2011 +0100 +++ b/testing/utp_1.1/utp_fcns/utpCloseConnection.m Wed Dec 07 17:24:37 2011 +0100 @@ -11,16 +11,6 @@ function utpCloseConnection(conn) - if isa(conn, 'database') - % MATLAB connection - if isconnection(conn) - close(conn); - end - elseif isa(conn, 'mpipeline.repository.RepositoryConnection') - % java connection - conn.closeConnection(); - else - error('### Unknown connection [%s]. Can not close the connection', class(conn)); - end + conn.close(); end
--- a/testing/utp_1.1/utp_fcns/utpGetConnection.m Wed Dec 07 17:24:36 2011 +0100 +++ b/testing/utp_1.1/utp_fcns/utpGetConnection.m Wed Dec 07 17:24:37 2011 +0100 @@ -12,10 +12,6 @@ function conn = utpGetConnection() -% % MATLAB connection -% conn = utils.mysql.connect(utpGetHostname, utpGetDatabase, utpGetUsername, utpGetPassword); - - % java connection - conn = utils.jmysql.connect(utpGetHostname, utpGetDatabase, utpGetUsername, utpGetPassword); + conn = utils.mysql.connect(utpGetHostname, utpGetDatabase, utpGetUsername, utpGetPassword); end
--- a/testing/utp_1.1/utp_fcns/utpGetConnectionPlist.m Wed Dec 07 17:24:36 2011 +0100 +++ b/testing/utp_1.1/utp_fcns/utpGetConnectionPlist.m Wed Dec 07 17:24:37 2011 +0100 @@ -12,9 +12,6 @@ function connPl = utpGetConnectionPlist() - % java connection - rm = LTPDARepositoryManager(); - rm.newConnection(utpGetHostname, utpGetDatabase, utpGetUsername, utpGetPassword); connPl = plist('hostname', utpGetHostname, 'database', utpGetDatabase, 'username', utpGetUsername); end
--- a/testing/utp_1.1/utps/ao/utp_ao_bsubmit.m Wed Dec 07 17:24:36 2011 +0100 +++ b/testing/utp_1.1/utps/ao/utp_ao_bsubmit.m Wed Dec 07 17:24:37 2011 +0100 @@ -31,8 +31,7 @@ plForAutoTest = plist('no dialog', true, 'use selector', false); connPl = utpGetConnectionPlist(); - rm = LTPDARepositoryManager(); - conn = rm.getConnection(connPl); + conn = utpGetConnection(); try experiment_title = 'utp_ao_bsubmit: submit ao';
--- a/testing/utp_1.1/utps/ao/utp_ao_submit.m Wed Dec 07 17:24:36 2011 +0100 +++ b/testing/utp_1.1/utps/ao/utp_ao_submit.m Wed Dec 07 17:24:37 2011 +0100 @@ -30,8 +30,7 @@ plForAutoTest = plist('no dialog', true, 'use selector', false); connPl = utpGetConnectionPlist(); - rm = LTPDARepositoryManager(); - conn = rm.getConnection(connPl); + conn = utpGetConnection(); try experiment_title = 'utp_ao_submit: submit ao';
--- a/testing/utp_1.1/utps/ao/utp_ao_update.m Wed Dec 07 17:24:36 2011 +0100 +++ b/testing/utp_1.1/utps/ao/utp_ao_update.m Wed Dec 07 17:24:37 2011 +0100 @@ -34,9 +34,9 @@ obj.setName(); plForAutoTest = plist('no dialog', true, 'use selector', false); + connPl = utpGetConnectionPlist(); - rm = LTPDARepositoryManager(); - conn = rm.getConnection(connPl); + conn = utpGetConnection(); try