System.Data.SQLite
Check-in [99a46a4feb]
Not logged in

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

Overview
Comment:In the test suite, avoid leaking memory used for data/temp_store_directory. Fix missing description in test [bb4b04d457].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 99a46a4feba7182da6bc35cbd913628220d2f251
User & Date: mistachkin 2012-12-29 21:37:36
Context
2012-12-29
21:55
Update source archive exclusion list and release archive manifest to include newly added files. check-in: 5bf6597b54 user: mistachkin tags: trunk
21:37
In the test suite, avoid leaking memory used for data/temp_store_directory. Fix missing description in test [bb4b04d457]. check-in: 99a46a4feb user: mistachkin tags: trunk
19:06
Add some diagnostic output to the backup and stress tests. check-in: 98e119edca user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/common.eagle.

  1218   1218         #       that need to make sure logging is initialized (i.e. just in case
  1219   1219         #       the SQLite core library was initialized in the process prior to
  1220   1220         #       the SQLiteLog class being able to setup its logging callback).
  1221   1221         #       Normally, this should only be performed if SQLite is loaded and
  1222   1222         #       ready for use by the test suite.
  1223   1223         #
  1224   1224         if {$force || [isSQLiteReady]} then {
         1225  +        #
         1226  +        # BUGFIX: Before calling the native shutdown function, make sure both
         1227  +        #         of the PRAGMA related directory names are freed.
         1228  +        #
         1229  +        checkForSQLiteDirectories $channel true
         1230  +
  1225   1231           if {[catch {object invoke -flags +NonPublic \
  1226   1232                   System.Data.SQLite.UnsafeNativeMethods \
  1227   1233                   sqlite3_shutdown} result] == 0} then {
  1228   1234             if {!$quiet} then {
  1229   1235               tputs $channel [appendArgs \
  1230   1236                   "---- call sqlite3_shutdown()... ok: " $result \n]
  1231   1237             }
................................................................................
  1698   1704           #
  1699   1705           # NOTE: Show when our tests actually ended (now).
  1700   1706           #
  1701   1707           tputs $::test_channel [appendArgs \
  1702   1708               "---- System.Data.SQLite tests ended at " \
  1703   1709               [clock format [clock seconds]] \n]
  1704   1710   
         1711  +        #
         1712  +        # BUGFIX: Before checking the final resources in use by SQLite, make
         1713  +        #         sure both of the PRAGMA related directory names are freed.
         1714  +        #
         1715  +        checkForSQLiteDirectories $::test_channel true
         1716  +
  1705   1717           #
  1706   1718           # NOTE: Also report the resource usage after running the tests.
  1707   1719           #
  1708   1720           reportSQLiteResources $::test_channel
  1709   1721         }
  1710   1722       }
  1711   1723   

Changes to Tests/thread.eagle.

    86     86       INSERT INTO t1 (y) VALUES(RANDOMBLOB(${count(4)}));
    87     87       INSERT INTO t1 (y) VALUES(RANDOMBLOB(${count(4)}));
    88     88       INSERT INTO t1 (y) VALUES(RANDOMBLOB(${count(4)}));
    89     89       INSERT INTO t1 (y) VALUES(RANDOMBLOB(${count(4)}));
    90     90     }]
    91     91   
    92     92     #
    93         -  # NOTE: The temporary directory must be reset here because it allocates
    94         -  #       some SQLite memory and this test requires an extremely accurate
    95         -  #       reading.
           93  +  # NOTE: The data and temporary directories must be reset here (after the
           94  +  #       setupDb call above) because they allocate some SQLite memory and
           95  +  #       this test requires an extremely accurate reading.
    96     96     #
    97     97     sql execute $db {
           98  +    PRAGMA data_store_directory = "";
    98     99       PRAGMA temp_store_directory = "";
    99    100     }
   100    101   
   101    102     #
   102    103     # NOTE: Close the database now, freeing any native SQLite memory and/or
   103    104     #       resources that it may be using at this point; however, do not
   104    105     #       actually delete the database file because it is needed in the C#

Changes to Tests/tkt-bb4b04d457.eagle.

    16     16   ###############################################################################
    17     17   
    18     18   package require System.Data.SQLite.Test
    19     19   runSQLiteTestPrologue
    20     20   
    21     21   ###############################################################################
    22     22   
    23         -runTest {test tkt-bb4b04d457-1.1 {} -setup {
           23  +runTest {test tkt-bb4b04d457-1.1 {TIMESTAMP column with Ticks} -setup {
    24     24     setupDb [set fileName tkt-bb4b04d457-1.1.db] "" Ticks Utc
    25     25   } -body {
    26     26     set dateTime [object invoke -alias DateTime Parse 2011-11-29T12:34:56Z]
    27     27     set dateTime [$dateTime -alias ToUniversalTime]
    28     28   
    29     29     sql execute $db "CREATE TABLE t1(x TIMESTAMP NOT NULL);"
    30     30