Mercurial > hg > ltpda
view testing/utp_1.1/utp_fcns/utpCloseConnection.m @ 44:409a22968d5e default
Add unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 18:42:11 +0100 |
parents | |
children | 7d2e2e065cf1 |
line wrap: on
line source
% UTPCLOSECONNECTION closes the connection. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: UTPCLOSECONNECTION closes the connection. % % CALL: utpGetConnection(conn) % % VERSION: $Id: utpCloseConnection.m,v 1.2 2009/09/20 15:38:53 ingo Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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 end