Update of /project/elephant/cvsroot/elephant/tests In directory common-lisp.net:/tmp/cvs-serv28278/tests
Modified Files: testsleepycat.lisp Log Message: first stab at RT-ifying
Date: Thu Sep 16 06:28:05 2004 Author: blee
Index: elephant/tests/testsleepycat.lisp diff -u elephant/tests/testsleepycat.lisp:1.1 elephant/tests/testsleepycat.lisp:1.2 --- elephant/tests/testsleepycat.lisp:1.1 Mon Aug 30 23:40:38 2004 +++ elephant/tests/testsleepycat.lisp Thu Sep 16 06:28:05 2004 @@ -1,4 +1,5 @@
+(in-package "ELE-TESTS") (use-package "SLEEPYCAT")
(defvar env) @@ -21,28 +22,37 @@ (db-open db :file "foo" :database "bar" :type DB-BTREE :auto-commit t :create t :thread t))
-(defun put-alot (keys) +(deftest prepares + (finishes (prepare)) t) + +(deftest put-alot + (finishes + (loop for key in keys + do + (db-put db key key :auto-commit t))) + t) + +(defun get-alot () (loop for key in keys - with datum = "mydatum" - do - (db-put db key datum :auto-commit t))) + always (string= key (db-get db key)))) + +(deftest put-right (get-alot) t)
-(defun put-alot-b (keys) - (with-transaction (:environment env) - (loop for key in keys - do - (db-put db key "mydatum")))) +(deftest put-alot-b + (finishes + (with-transaction (:environment env) + (loop for key in keys + do + (db-put db key key)))) + t) + +(deftest put-right-b (get-alot) t)
(defun txn-alot (iters) (loop for i from 1 to iters do (with-transaction (:environment env) (db-put db "mykey" "mydatum")))) - -(defun get-alot (keys) - (loop for key in keys - do - (db-get db key)))
(defun get-alot-b (keys) (loop for key in keys