System.Data.SQLite
Check-in [433ac1911c]
Not logged in

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

Overview
Comment:Vastly simplify the existing test for ticket [aba4549801].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 433ac1911c20f2656ed29fa0ec79d63bb73897d8
User & Date: mistachkin 2016-10-13 22:55:35
Context
2016-10-14
00:18
Improvements to the test suite infrastructure. Fix intermittent failures of the test for ticket [aba4549801]. check-in: 54a9280a9d user: mistachkin tags: trunk
2016-10-13
22:55
Vastly simplify the existing test for ticket [aba4549801]. check-in: 433ac1911c user: mistachkin tags: trunk
20:57
Fix ambiguous method overload selection issue in the 'getDateTimeTicks' test suite helper procedure. check-in: 8db28182d3 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/tkt-aba4549801.eagle.

18
19
20
21
22
23
24
25
26







27
28

29








30








31








32
33






34


35
36
37







38
39
40
41
42
43
44
..
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-aba4549801-1.1 {SQLiteConnection.Changed event} -setup {
  proc onChanged { sender e } {
    set list [list $sender]








    if {[string length $e] > 0} then {
      lappend list [$e EventType]

      lappend list [set o1 [$e -objectflags NoDispose Transaction]]








      lappend list [set o2 [$e -objectflags NoDispose Command]]








      lappend list [set o3 [$e -objectflags NoDispose DataReader]]








      lappend list [set o4 [$e -objectflags NoDispose CriticalHandle]]
    }









    lappend ::result $list
  }








  set callback onChanged
  object invoke System.Data.SQLite.SQLiteConnection add_Changed $callback

  setupDb [set fileName tkt-aba4549801-1.1.db]
} -body {
  sql execute $db "CREATE TABLE t1(x);"

................................................................................
  collectGarbage $test_channel

  set result
} -cleanup {
  object invoke System.Data.SQLite.SQLiteConnection remove_Changed $callback
  catch {object removecallback $callback}

  unset -nocomplain rows transaction result callback db fileName

  rename onChanged ""
} -constraints {eagle command.object monoBug28 monoBug211 command.sql\
compile.DATA SQLite System.Data.SQLite} -match regexp -result \
{^\{System#Data#SQLite#SQLiteConnection#\d+ Opening \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ ConnectionString \{\} \{\} \{\}\
\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\
System#Data#SQLite#SQLiteConnectionHandle#\d+\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Opened \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\
System#Data#SQLite#SQLiteStatementHandle#\d+\}\
\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\
System#Data#SQLite#SQLiteStatementHandle#\d+\}\
\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\
System#Data#SQLite#SQLiteStatementHandle#\d+\}\
\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewTransaction\
System#Data#SQLite#SQLiteTransaction#\d+ \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\
System#Data#SQLite#SQLiteStatementHandle#\d+\} \{\{\} NewCriticalHandle \{\}\
\{\} \{\} System#Data#SQLite#SQLiteStatementHandle#\d+\}\
\{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\
System#Data#SQLite#SQLiteStatementHandle#\d+\}\
\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\
System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\} \{\}\}\
\{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}$}}

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

runSQLiteTestEpilogue
runTestEpilogue







|

>
>
>
>
>
>
>


>
|
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
|
>
>



>
>
>
>
>
>
>







 







|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
82
83
84
85
86
87
88
89
90
91
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128



























































129
130
131
132
133
package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-aba4549801-1.1 {SQLiteConnection.Changed event} -setup {
  proc onChanged { sender e } {
    set list [list]

    if {[isObjectHandle $sender] && \
        [regexp -- $::patterns(connection) $sender]} then {
      lappend list 1
    } else {
      lappend list $sender
    }

    if {[string length $e] > 0} then {
      lappend list [$e EventType]

      set o1 [$e -objectflags NoDispose Transaction]

      if {[isObjectHandle $o1] && \
          [regexp -- $::patterns(transaction) $o1]} then {
        lappend list 1
      } else {
        lappend list $o1
      }

      set o2 [$e -objectflags NoDispose Command]

      if {[isObjectHandle $o2] && \
          [regexp -- $::patterns(command) $o2]} then {
        lappend list 1
      } else {
        lappend list $o2
      }

      set o3 [$e -objectflags NoDispose DataReader]

      if {[isObjectHandle $o3] && \
          [regexp -- $::patterns(dataReader) $o3]} then {
        lappend list 1
      } else {
        lappend list $o3
      }

      set o4 [$e -objectflags NoDispose CriticalHandle]

      if {[isObjectHandle $o4] && \
          ([regexp -- $::patterns(handle1) $o4] || \
           [regexp -- $::patterns(handle2) $o4])} then {
        lappend list 1
      } else {
        lappend list $o4
      }
    }

    lappend ::result $list
  }

  set patterns(connection) {^System#Data#SQLite#SQLiteConnection#\d+$}
  set patterns(transaction) {^System#Data#SQLite#SQLiteTransaction#\d+$}
  set patterns(command) {^System#Data#SQLite#SQLiteCommand#\d+$}
  set patterns(dataReader) {^System#Data#SQLite#SQLiteDataReader#\d+$}
  set patterns(handle1) {^System#Data#SQLite#SQLiteConnectionHandle#\d+$}
  set patterns(handle2) {^System#Data#SQLite#SQLiteStatementHandle#\d+$}

  set callback onChanged
  object invoke System.Data.SQLite.SQLiteConnection add_Changed $callback

  setupDb [set fileName tkt-aba4549801-1.1.db]
} -body {
  sql execute $db "CREATE TABLE t1(x);"

................................................................................
  collectGarbage $test_channel

  set result
} -cleanup {
  object invoke System.Data.SQLite.SQLiteConnection remove_Changed $callback
  catch {object removecallback $callback}

  unset -nocomplain rows transaction result callback patterns db fileName

  rename onChanged ""
} -constraints {eagle command.object monoBug28 monoBug211 command.sql\
compile.DATA SQLite System.Data.SQLite} -result {{1 Opening {} {} {} {}} {1\
Closing {} {} {} {}} {1 Closed {} {} {} {}} {1 ConnectionString {} {} {} {}}\
{{} NewCriticalHandle {} {} {} 1} {1 NewCommand {} 1 {} {}} {1 DisposingCommand\
{} 1 {} {}} {1 Opened {} {} {} {}} {1 NewCommand {} 1 {} {}} {1 NewDataReader\
{} 1 1 {}} {{} NewCriticalHandle {} {} {} 1} {1 DisposingDataReader {} 1 1 {}}\
{1 ClosingDataReader {} 1 1 {}} {1 DisposingCommand {} 1 {} {}} {1 NewCommand\
{} 1 {} {}} {1 NewDataReader {} 1 1 {}} {{} NewCriticalHandle {} {} {} 1} {1\
DisposingDataReader {} 1 1 {}} {1 ClosingDataReader {} 1 1 {}} {1\
DisposingCommand {} 1 {} {}} {1 NewCommand {} 1 {} {}} {1 NewDataReader {} 1 1\
{}} {{} NewCriticalHandle {} {} {} 1} {1 DisposingDataReader {} 1 1 {}} {1\
ClosingDataReader {} 1 1 {}} {1 DisposingCommand {} 1 {} {}} {1 NewTransaction\
1 {} {} {}} {1 NewCommand {} 1 {} {}} {1 NewDataReader {} 1 1 {}} {{}\
NewCriticalHandle {} {} {} 1} {{} NewCriticalHandle {} {} {} 1} {1\
ClosingDataReader {} 1 1 {}} {1 DisposingCommand {} 1 {} {}} {1 NewCommand {} 1\
{} {}} {1 NewDataReader {} 1 1 {}} {{} NewCriticalHandle {} {} {} 1} {1\
DisposingDataReader {} 1 1 {}} {1 ClosingDataReader {} 1 1 {}} {1\
DisposingCommand {} 1 {} {}} {1 Closing {} {} {} {}} {1 Closed {} {} {} {}} {1\
Closing {} {} {} {}} {1 Closed {} {} {} {}}}}




























































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

runSQLiteTestEpilogue
runTestEpilogue