System.Data.SQLite

Check-in [dca5b4660b]
Login

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

Overview
Comment:Add another transaction enlistment test.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dca5b4660b7d36e0b9c1b8dea70db9f298b0b84d
User & Date: mistachkin 2014-01-29 23:30:01.452
Context
2014-01-30
00:17
More tests. check-in: 982395fc95 user: mistachkin tags: trunk
2014-01-29
23:30
Add another transaction enlistment test. check-in: dca5b4660b user: mistachkin tags: trunk
01:04
Enhance the design-time installer diagnostics when refreshing the Visual Studio configuration using 'setup' mode. check-in: 0719ed3878 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/tkt-56b42d99c1.eagle.
98
99
100
101
102
103
104
























































105
106
107
108
109
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result results errors code dataSource id db fileName
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 True$}}

























































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

runSQLiteTestEpilogue
runTestEpilogue







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





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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result results errors code dataSource id db fileName
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 True$}}

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

runTest {test tkt-56b42d99c1-1.2 {enlisted transaction isolation} -setup {
  setupDb [set fileName tkt-56b42d99c1-1.2.db]
} -body {
  set id [object invoke Interpreter.GetActive NextId]
  set dataSource [file join [getDatabaseDirectory] $fileName]

  unset -nocomplain results errors

  set code [compileCSharpWith [subst {
    using System.Data.SQLite;
    using System.Transactions;

    namespace _Dynamic${id}
    {
      public static class Test${id}
      {
        public static void Main()
        {
          TransactionOptions transactionOptions = new TransactionOptions();
          transactionOptions.IsolationLevel = IsolationLevel.ReadCommitted;

          using (TransactionScope transactionScope = new TransactionScope(
              TransactionScopeOption.Required, transactionOptions))
          {
            using (SQLiteConnection connection1 = new SQLiteConnection(
                "Data Source=${dataSource};Enlist=True;[getFlagsProperty]"))
            {
              connection1.Open();

              using (SQLiteConnection connection2 = new SQLiteConnection(
                  "Data Source=${dataSource};Enlist=True;[getFlagsProperty]"))
              {
                connection2.Open();
              }
            }
          }
        }
      }
    }
  }] true true true results errors System.Data.SQLite.dll]

  list $code $results \
      [expr {[info exists errors] ? $errors : ""}] \
      [expr {$code eq "Ok" ? [catch {
        object invoke _Dynamic${id}.Test${id} Main
      } result] : [set result ""]}] $result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result results errors code dataSource id db fileName
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}

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

runSQLiteTestEpilogue
runTestEpilogue