System.Data.SQLite

Check-in [4a360ab908]
Login

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

Overview
Comment:In the test case for ticket [996d13cd87], after the first two interations, use a random number of worker threads accessing the connection pool.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4a360ab908c4ee044979f048d05102031b1cdba9
User & Date: mistachkin 2012-05-05 13:02:33.096
Context
2012-05-06
18:43
Update SQLite core library to the latest trunk code. check-in: e930be6c75 user: mistachkin tags: trunk
2012-05-05
13:02
In the test case for ticket [996d13cd87], after the first two interations, use a random number of worker threads accessing the connection pool. check-in: 4a360ab908 user: mistachkin tags: trunk
01:22
Fix some comments. check-in: 3e63eb3d59 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/tkt-996d13cd87.eagle.
18
19
20
21
22
23
24

25
26
27
28
29



30
31
32
33
34
35
36
package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

for {set i 1} {$i < 11} {incr i} {
  set pooling [expr {$i % 2 == 0 ? True : False}]


  runTest {test [appendArgs tkt-996d13cd87-1. $i] {SQLiteConnection stress} \
      -setup {
    set fileName [appendArgs tkt-996d13cd87-1. $i .db]




    if {[catch {
        object invoke -flags +NonPublic \
            System.Data.SQLite.SQLiteConnectionPool _poolOpened 0

        object invoke -flags +NonPublic \
            System.Data.SQLite.SQLiteConnectionPool _poolClosed 0
    }] == 0} then {







>





>
>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

for {set i 1} {$i < 11} {incr i} {
  set pooling [expr {$i % 2 == 0 ? True : False}]
  set count [expr {$i <= 2 ? 100 : int(rand() * 100 + 1)}]

  runTest {test [appendArgs tkt-996d13cd87-1. $i] {SQLiteConnection stress} \
      -setup {
    set fileName [appendArgs tkt-996d13cd87-1. $i .db]

    tputs $test_channel [appendArgs \
        "---- using a total of " $count " threads...\n"]

    if {[catch {
        object invoke -flags +NonPublic \
            System.Data.SQLite.SQLiteConnectionPool _poolOpened 0

        object invoke -flags +NonPublic \
            System.Data.SQLite.SQLiteConnectionPool _poolClosed 0
    }] == 0} then {
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
            //       test threads.
            //
            int errors = 0;

            //
            // NOTE: This is the total number of test threads to create.
            //
            int count = 100;

            //
            // NOTE: This is the total number of times we should force a full
            //       garbage collection.
            //
            int gcCount = 2;








|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
            //       test threads.
            //
            int errors = 0;

            //
            // NOTE: This is the total number of test threads to create.
            //
            int count = ${count};

            //
            // NOTE: This is the total number of times we should force a full
            //       garbage collection.
            //
            int gcCount = 2;

283
284
285
286
287
288
289
290
291
292
293
294
295
  } -constraints {eagle monoBug28 command.sql compile.DATA\
SQLite System.Data.SQLite} -match regexp -result {^Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \d+ \{\} True True$}}
}

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

unset -nocomplain pooling i

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

runSQLiteTestEpilogue
runTestEpilogue







|





287
288
289
290
291
292
293
294
295
296
297
298
299
  } -constraints {eagle monoBug28 command.sql compile.DATA\
SQLite System.Data.SQLite} -match regexp -result {^Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \d+ \{\} True True$}}
}

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

unset -nocomplain count pooling i

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

runSQLiteTestEpilogue
runTestEpilogue