System.Data.SQLite
Check-in [5e689a7650]
Not logged in

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

Overview
Comment:Add another test to verify the behavior of read-only connections with respect to the connection pool. See also check-in [14d18ee82623c85f].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5e689a7650e9e5e0e95da2ea64867c76c11008fe
User & Date: mistachkin 2018-07-10 11:10:50
Context
2018-07-11
01:36
Adjust the test constraints impacted by Mono 5.12. check-in: fa2e15166b user: mistachkin tags: trunk
2018-07-10
11:10
Add another test to verify the behavior of read-only connections with respect to the connection pool. See also check-in [14d18ee82623c85f]. check-in: 5e689a7650 user: mistachkin tags: trunk
01:53
Do not allow read-only connections into (or out of) the connection pool. check-in: 14d18ee826 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

  5095   5095     unset -nocomplain error code db fileName
  5096   5096   
  5097   5097     rename getPoolCounts ""
  5098   5098   } -constraints \
  5099   5099   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  5100   5100   {{0 0} 1 {attempt to write a readonly database} 1 {attempt to write a readonly\
  5101   5101   database} 1}}
         5102  +
         5103  +###############################################################################
         5104  +
         5105  +runTest {test data-1.97 {connection pool interaction with read-only} -setup {
         5106  +  setupDb [set fileName data-1.97.db]
         5107  +} -body {
         5108  +  sql execute $db "CREATE TABLE t1(x);"
         5109  +  sql execute $db "INSERT INTO t1 (x) VALUES(1);"
         5110  +
         5111  +  cleanupDb $fileName db true false false
         5112  +  setupDb $fileName "" "" "" "" "Read Only=True;Pooling=True;" true false
         5113  +
         5114  +  set code(1) [catch {
         5115  +    sql execute $db "INSERT INTO t1 (x) VALUES(2);"
         5116  +  } error(1)]
         5117  +
         5118  +  cleanupDb $fileName db true false false
         5119  +  setupDb $fileName "" "" "" "" "Pooling=True;" true false
         5120  +
         5121  +  set code(2) [catch {
         5122  +    sql execute $db "INSERT INTO t1 (x) VALUES(3);"
         5123  +  } error(2)]
         5124  +
         5125  +  cleanupDb $fileName db true false false
         5126  +  setupDb $fileName "" "" "" "" "" true false
         5127  +
         5128  +  list $code(1) [extractSystemDataSQLiteExceptionMessage $error(1)] \
         5129  +      $code(2) [extractSystemDataSQLiteExceptionMessage $error(2)] \
         5130  +      [sql execute -execute scalar $db "SELECT SUM(x) FROM t1;"]
         5131  +} -cleanup {
         5132  +  cleanupDb $fileName
         5133  +
         5134  +  unset -nocomplain error code db fileName
         5135  +} -constraints \
         5136  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
         5137  +{1 {attempt to write a readonly database} 0 1 4}}
  5102   5138   
  5103   5139   ###############################################################################
  5104   5140   
  5105   5141   reportSQLiteResources $test_channel
  5106   5142   
  5107   5143   ###############################################################################
  5108   5144   
  5109   5145   runSQLiteTestFilesEpilogue
  5110   5146   runSQLiteTestEpilogue
  5111   5147   runTestEpilogue