| OLD | NEW |
| 1 # 2011 July 11 | 1 # 2011 July 11 |
| 2 # | 2 # |
| 3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
| 4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
| 5 # | 5 # |
| 6 # May you do good and not evil. | 6 # May you do good and not evil. |
| 7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
| 8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
| 9 # | 9 # |
| 10 #*********************************************************************** | 10 #*********************************************************************** |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 set ::msg | 57 set ::msg |
| 58 } {disk I/O error} | 58 } {disk I/O error} |
| 59 } else { | 59 } else { |
| 60 lappend win32_lock_ok $::delay1 | 60 lappend win32_lock_ok $::delay1 |
| 61 do_test win32lock-1.2-$delay1-ok { | 61 do_test win32lock-1.2-$delay1-ok { |
| 62 set ::msg | 62 set ::msg |
| 63 } {1 100000 2 50000 3 25000 4 12500} | 63 } {1 100000 2 50000 3 25000 4 12500} |
| 64 if {[info exists ::log] && $::log!=""} { | 64 if {[info exists ::log] && $::log!=""} { |
| 65 do_test win32lock-1.2-$delay1-log1 { | 65 do_test win32lock-1.2-$delay1-log1 { |
| 66 regsub {\d+} $::log # x | 66 regsub {\d+} $::log # x |
| 67 regsub { at line \d+} $x "" x |
| 67 set x | 68 set x |
| 68 } {{delayed #ms for lock/sharing conflict}} | 69 } {{delayed #ms for lock/sharing conflict}} |
| 69 } | 70 } |
| 70 } | 71 } |
| 71 if {[llength $win32_lock_ok] && [llength $win32_lock_error]} break | 72 if {[llength $win32_lock_ok] && [llength $win32_lock_error]} break |
| 72 incr delay1 25 | 73 incr delay1 25 |
| 73 if {$delay1 > 12500} { | 74 if {$delay1 > 12500} { |
| 74 puts "Timed out waiting for \"ok\" and \"error\" results." | 75 puts "Timed out waiting for \"ok\" and \"error\" results." |
| 75 break | 76 break |
| 76 } | 77 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 105 set ::msg | 106 set ::msg |
| 106 } {disk I/O error} | 107 } {disk I/O error} |
| 107 } else { | 108 } else { |
| 108 lappend win32_lock_ok $::delay1 | 109 lappend win32_lock_ok $::delay1 |
| 109 do_test win32lock-2.2-$delay1-ok { | 110 do_test win32lock-2.2-$delay1-ok { |
| 110 set ::msg | 111 set ::msg |
| 111 } {1 100000 2 50000 3 25000 4 12500} | 112 } {1 100000 2 50000 3 25000 4 12500} |
| 112 if {[info exists ::log] && $::log!=""} { | 113 if {[info exists ::log] && $::log!=""} { |
| 113 do_test win32lock-2.2-$delay1-log1 { | 114 do_test win32lock-2.2-$delay1-log1 { |
| 114 regsub {\d+} $::log # x | 115 regsub {\d+} $::log # x |
| 116 regsub { at line \d+} $x "" x |
| 115 set x | 117 set x |
| 116 } {{delayed #ms for lock/sharing conflict}} | 118 } {{delayed #ms for lock/sharing conflict}} |
| 117 } | 119 } |
| 118 } | 120 } |
| 119 if {[llength $win32_lock_ok] && [llength $win32_lock_error]} break | 121 if {[llength $win32_lock_ok] && [llength $win32_lock_error]} break |
| 120 incr delay1 1 | 122 incr delay1 1 |
| 121 if {$delay1 > 500} { | 123 if {$delay1 > 500} { |
| 122 puts "Timed out waiting for \"ok\" and \"error\" results." | 124 puts "Timed out waiting for \"ok\" and \"error\" results." |
| 123 break | 125 break |
| 124 } | 126 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 COMMIT; | 173 COMMIT; |
| 172 }] [file_control_win32_set_handle db $handle] [sqlite3_extended_errcode db] | 174 }] [file_control_win32_set_handle db $handle] [sqlite3_extended_errcode db] |
| 173 } {{1 {disk I/O error}} {0 0} SQLITE_IOERR_LOCK} | 175 } {{1 {disk I/O error}} {0 0} SQLITE_IOERR_LOCK} |
| 174 | 176 |
| 175 db2 close | 177 db2 close |
| 176 db close | 178 db close |
| 177 sqlite3_shutdown | 179 sqlite3_shutdown |
| 178 test_sqlite3_log | 180 test_sqlite3_log |
| 179 sqlite3_initialize | 181 sqlite3_initialize |
| 180 finish_test | 182 finish_test |
| OLD | NEW |