Index: Tests/stress.eagle ================================================================== --- Tests/stress.eagle +++ Tests/stress.eagle @@ -20,11 +20,11 @@ ############################################################################### runTest {test stress-1.1 {multithreaded stress testing} -setup { unset -nocomplain result thread index workload noWorkload srcDb db \ - fileName compiled options count + fileName compiled options count loggingLambda ############################################################################# proc expectedError { error } { return [expr {[regexp -- {\sno such table: t1\s} $error] || \ @@ -46,10 +46,34 @@ tputs $::test_channel [appendArgs \ \n [info level $level] ": " $error \n] exit Failure; # halt all testing now. } + + ############################################################################# + + proc setupLogging {} { + if {[info exists ::loggingLambda]} then return + set ::loggingLambda [list apply [list [list sender e] { + tputs $::test_channel [appendArgs \ + "---- SQLiteLog.Log (" [$e ErrorCode] "): " [$e Message] \n] + }]] + object invoke System.Data.SQLite.SQLiteLog add_Log $::loggingLambda + tputs $::test_channel "---- setupLogging: SQLite logging enabled.\n" + } + + ############################################################################# + + proc cleanupLogging {} { + if {![info exists ::loggingLambda]} then return + object invoke System.Data.SQLite.SQLiteLog remove_Log $::loggingLambda + tputs $::test_channel "---- cleanupLogging: SQLite logging disabled.\n" + } + + ############################################################################# + + setupLogging ############################################################################# set count(0) 1 set count(1) 5 @@ -636,14 +660,20 @@ object removecallback [list apply $workload($index(0)) $fileName(1) \ $fileName(2) t1 $count(1)] } } + cleanupLogging + catch {object removecallback $loggingLambda} + + rename cleanupLogging "" + rename setupLogging "" + unset -nocomplain result thread index workload noWorkload srcDb db \ - fileName compiled options count times + fileName compiled options count times loggingLambda } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result {}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue