System.Data.SQLite
Check-in [738abc1a0b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Logging related enhancements to stress test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | threadAbortProtect
Files: files | file ages | folders
SHA1: 738abc1a0b3a80e27bd0851ce4f58520d4cd39ca
User & Date: mistachkin 2012-10-12 13:40:43
Context
2012-10-12
14:09
Enhance stress test workload diagnostic messages. check-in: 70c11fc93f user: mistachkin tags: threadAbortProtect
13:40
Logging related enhancements to stress test. check-in: 738abc1a0b user: mistachkin tags: threadAbortProtect
11:28
Enhance Thread.Abort protection and add a special test for it. Also, enhance the test suite infrastructure in support of this new test and fix comments in a related test file. check-in: 6f81afd900 user: mistachkin tags: threadAbortProtect
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to Tests/stress.eagle.

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
44
45
46
47
48
49
50
























51
52
53
54
55
56
57
...
634
635
636
637
638
639
640






641
642
643
644
645
646
647
648
649
package require System.Data.SQLite.Test
runSQLiteTestPrologue

###############################################################################

runTest {test stress-1.1 {multithreaded stress testing} -setup {
  unset -nocomplain result thread index workload noWorkload srcDb db \
      fileName compiled options count

  #############################################################################

  proc expectedError { error } {
    return [expr {[regexp -- {\sno such table: t1\s} $error] || \
        [regexp -- {\sdatabase is locked\s} $error]}]
  }
................................................................................
    set level [expr {[info level] - 1}]

    tputs $::test_channel [appendArgs \
        \n [info level $level] ": " $error \n]

    exit Failure; # halt all testing now.
  }

























  #############################################################################

  set count(0) 1
  set count(1) 5
  set count(2) 300
  set noWorkload [list]
................................................................................
  foreach index(0) [array names workload] {
    catch {
      object removecallback [list apply $workload($index(0)) $fileName(1) \
          $fileName(2) t1 $count(1)]
    }
  }







  unset -nocomplain result thread index workload noWorkload srcDb db \
      fileName compiled options count times
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result {}}

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>

|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
package require System.Data.SQLite.Test
runSQLiteTestPrologue

###############################################################################

runTest {test stress-1.1 {multithreaded stress testing} -setup {
  unset -nocomplain result thread index workload noWorkload srcDb db \
      fileName compiled options count loggingLambda

  #############################################################################

  proc expectedError { error } {
    return [expr {[regexp -- {\sno such table: t1\s} $error] || \
        [regexp -- {\sdatabase is locked\s} $error]}]
  }
................................................................................
    set level [expr {[info level] - 1}]

    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
  set count(2) 300
  set noWorkload [list]
................................................................................
  foreach index(0) [array names workload] {
    catch {
      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 loggingLambda
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result {}}

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue