[cl-prevalence-cvs] CVS update: cl-prevalence/test/test-prevalence.lisp

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Fri Jun 25 16:19:05 UTC 2004


Update of /project/cl-prevalence/cvsroot/cl-prevalence/test
In directory common-lisp.net:/tmp/cvs-serv13767/test

Modified Files:
	test-prevalence.lisp 
Log Message:
we now call close-open-streams because windos chokes on this when the file is later deleted

Date: Fri Jun 25 09:19:05 2004
Author: scaekenberghe

Index: cl-prevalence/test/test-prevalence.lisp
diff -u cl-prevalence/test/test-prevalence.lisp:1.1.1.1 cl-prevalence/test/test-prevalence.lisp:1.2
--- cl-prevalence/test/test-prevalence.lisp:1.1.1.1	Sun Jun 20 12:13:42 2004
+++ cl-prevalence/test/test-prevalence.lisp	Fri Jun 25 09:19:05 2004
@@ -1,6 +1,6 @@
 ;;;; -*- mode: Lisp -*-
 ;;;;
-;;;; $Id: test-prevalence.lisp,v 1.1.1.1 2004/06/20 19:13:42 scaekenberghe Exp $
+;;;; $Id: test-prevalence.lisp,v 1.2 2004/06/25 16:19:05 scaekenberghe Exp $
 ;;;;
 ;;;; Testing Object Prevalence in Common Lisp
 ;;;;
@@ -12,11 +12,13 @@
 
 (in-package :cl-prevalence)
 
-(defvar *test-system*)
+(defparameter *test-system-directory* (pathname "/tmp/test-prevalence-system/"))
+
+(defvar *test-system* nil)
 
 ;; Create a new prevalence system for testing purposes
 
-(let ((directory (pathname "/tmp/test-prevalence-system/")))
+(let ((directory *test-system-directory*))
   ;; Throw away any xml files that we find: we want to start from scratch
   (when (probe-file directory)
     (dolist (pathname (directory (merge-pathnames "*.xml" directory)))
@@ -83,8 +85,8 @@
 ;; Throw away the previous prevalence instance and start over,
 ;; counting on a restore operation using the transaction log
 
-(let ((directory (pathname "/tmp/test-prevalence-system/")))
-  (setf *test-system* (make-prevalence-system directory)))
+(close-open-streams *test-system*)
+(setf *test-system* (make-prevalence-system *test-system-directory*))
 
 (let ((person (gethash *jlp* (get-root-object *test-system* :persons))))
   (assert (eq (class-of person) (find-class 'person)))
@@ -103,8 +105,8 @@
 ;; Throw away the previous prevalence instance and start over,
 ;; counting on a restore operation using the snapshot
 
-(let ((directory (pathname "/tmp/test-prevalence-system/")))
-  (setf *test-system* (make-prevalence-system directory)))
+(close-open-streams *test-system*)
+(setf *test-system* (make-prevalence-system *test-system-directory*))
 
 (let ((person (gethash *jlp* (get-root-object *test-system* :persons))))
   (assert (eq (class-of person) (find-class 'person)))
@@ -129,8 +131,8 @@
 ;; Throw away the previous prevalence instance and start over,
 ;; counting on a restore operation using both the snapshot and the transaction log
 
-(let ((directory (pathname "/tmp/test-prevalence-system/")))
-  (setf *test-system* (make-prevalence-system directory)))
+(close-open-streams *test-system*)
+(setf *test-system* (make-prevalence-system *test-system-directory*))
 
 (let ((person (gethash *jlp* (get-root-object *test-system* :persons))))
   (assert (eq (class-of person) (find-class 'person)))
@@ -156,9 +158,10 @@
   (setf *guard* t)
   (funcall thunk))
 
-(let ((directory (pathname "/tmp/test-prevalence-system/")))
-  (setf *test-system* (make-prevalence-system directory :prevalence-system-class 'guarded-prevalence-system))
-  (setf (get-guard *test-system*) #'guard))
+(close-open-streams *test-system*)
+(setf *test-system* (make-prevalence-system *test-system-directory* 
+                                            :prevalence-system-class 'guarded-prevalence-system))
+(setf (get-guard *test-system*) #'guard)
 
 (let (new-person)
   (setf *guard* nil)





More information about the Cl-prevalence-cvs mailing list