Changeset 4257 for trunk/psLib/test/dataIO/tst_psDB.c
- Timestamp:
- Jun 14, 2005, 3:02:08 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/dataIO/tst_psDB.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataIO/tst_psDB.c
r4105 r4257 9 9 * @author Aaron Culliney, MHPCC 10 10 * 11 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 03 23:46:07$11 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-15 01:02:08 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 98 98 psDB *dbh = NULL; 99 99 100 psLogMsg( __func__, PS_LOG_INFO, "initialize database connection...\n" ); 101 100 // Initialize database connection with test database 102 101 dbh = psDBInit(host, user, passwd, dbname); 103 102 if (dbh == NULL) { … … 290 289 } 291 290 292 // Testpoint # XXX, initialize/break-down MySQL connection.291 // Testpoint #841, initialize/break-down MySQL connection. 293 292 psS32 TPDBInit( void ) 294 293 { 295 psS32 failed = 0; 296 psDB *dbh = NULL; 297 298 psLogMsg( __func__, PS_LOG_INFO, "psDBInit/psDBCleanup shall initialize/cleanup database connection.\n" ); 299 300 dbh = _init_psDB(); 301 if (dbh == NULL) { 302 return 1; 303 } 304 305 psDBCleanup(dbh); 306 307 return failed; 294 psDB *dbh = NULL; 295 296 // Initialize database with valid arguments 297 dbh = _init_psDB(); 298 if (dbh == NULL) { 299 psError(PS_ERR_UNKNOWN,true,"Did not expect NULL to be returned for valid arguments"); 300 return 1; 301 } 302 303 // Cleanup database/connection with valid psDB object 304 psDBCleanup(dbh); 305 306 // Attempt to initialize database with invalid arguments 307 dbh = psDBInit("xxx",NULL,NULL,NULL); 308 if(dbh != NULL) { 309 psError(PS_ERR_UNKNOWN,true,"Did not expect non-NULL psDB with invalid arguments"); 310 return 2; 311 } 312 313 // Attempt cleanup database/connection with NULL psDB object 314 psDBCleanup(NULL); 315 316 return 0; 308 317 } 309 318
Note:
See TracChangeset
for help on using the changeset viewer.
