From 584da190ae32b6883561fb7f34c8af633341db9b Mon Sep 17 00:00:00 2001 From: kishoramballi Date: Mon, 24 Mar 2008 15:46:58 +0000 Subject: [PATCH] test script modified to suit the test case --- test/dbapi/Connection/conntest2.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) rewrite test/dbapi/Connection/conntest2.c (80%) diff --git a/test/dbapi/Connection/conntest2.c b/test/dbapi/Connection/conntest2.c dissimilarity index 80% index 5052d928..44d856f3 100644 --- a/test/dbapi/Connection/conntest2.c +++ b/test/dbapi/Connection/conntest2.c @@ -1,20 +1,18 @@ -#include -int main() -{ - Connection conn; - DbRetVal rv = conn.open("root", "manager"); - if (rv != OK) return 1; - - //checking whether it returns already connected error - rv = conn.open("root", "manager"); - if (rv == OK) return 2; - - rv = conn.close(); - if (rv != OK) return 3; - - //when not connected both are expected to return NULL - DatabaseManager *dbMgr = conn.getDatabaseManager(); - UserManager *uMgr = conn.getUserManager(); - if (dbMgr != NULL || uMgr != NULL) return 5; - return 0; -} +// Make sure the server is not running + +#include + +int main() +{ + Connection conn; + DbRetVal rv = conn.open("root", "manager"); + if (rv == OK) { + printf("The server must be running. Stop the server and rerun the test\n"); + printf("Test failed\n"); + return 1; + } + if (rv != OK) { + printf("The test passed, return value %d\n", rv); + return 0; + } +} -- 2.11.4.GIT