[elephant-cvs] CVS elephant/tests

ieslick ieslick at common-lisp.net
Tue Mar 7 14:12:22 UTC 2006


Update of /project/elephant/cvsroot/elephant/tests
In directory clnet:/tmp/cvs-serv556/tests

Modified Files:
	elephant-tests.lisp testmigration.lisp 
Log Message:
Added legacy upgrade support, fixed some store-controller base class functionality for SQL to properly delete connections on close

--- /project/elephant/cvsroot/elephant/tests/elephant-tests.lisp	2006/02/22 22:01:45	1.19
+++ /project/elephant/cvsroot/elephant/tests/elephant-tests.lisp	2006/03/07 14:12:22	1.20
@@ -83,6 +83,10 @@
   '(:clsql (:sqlite3 "sqlite3-test.db"))
   "This is of the form '(filename &optional init-function),")
 
+(defvar *testsqlite3-spec2*
+  '(:clsql (:sqlite3 "sqlite3-test2.db"))
+  "This is of the form '(filename &optional init-function),")
+
 (defvar *testsqlite3-memory-spec*
   '(:clsql (:sqlite3 :memory))
   "Using :memory: as a file name will get you an completely in-memory system")
--- /project/elephant/cvsroot/elephant/tests/testmigration.lisp	2006/02/21 19:40:08	1.10
+++ /project/elephant/cvsroot/elephant/tests/testmigration.lisp	2006/03/07 14:12:22	1.11
@@ -181,6 +181,8 @@
 		   (setf (elephant::%index-cache (find-class 'ipfoo)) nil)
 		   (find-class-index 'ipfoo :sc sc1)
 ;;		   (format t "Making objects~%")
+		   (with-transaction (:store-controller sc2)
+		     (drop-instances (get-instances-by-class 'ipfoo) :sc sc2))
 		   (with-transaction (:store-controller sc1)
 		     (drop-instances (get-instances-by-class 'ipfoo) :sc sc1)
 		     (make-instance 'ipfoo :slot1 1 :sc sc1)
@@ -197,10 +199,10 @@
 			 (fm3 (get-instances-by-value 'ipfoo 'slot1 20))
 			 (all (get-instances-by-class 'ipfoo)))
 ;;		     (format t "Clear & return~%")
-		     (let ((insts (get-instances-by-class 'ipfoo)))
-		       (with-transaction (:store-controller sc2)
+;;		     (let ((insts (get-instances-by-class 'ipfoo)))
+;;		       (with-transaction (:store-controller sc2)
 ;;			 (format t "Dropping instances~%")
-			 (drop-instances insts :sc sc2)))
+;;			 (drop-instances insts :sc sc2)))
 		     (values 
 			  (length all)
 			  (length fm1) 




More information about the Elephant-cvs mailing list