Lines Matching refs:progress

12 # focus of this file is testing the 'progress callback'.
14 # $Id: progress.test,v 1.8 2007/06/15 14:53:53 danielk1977 Exp $
19 # If the progress callback is not available in this build, skip this
21 ifcapable !progress {
45 # Test that the progress callback is invoked.
46 do_test progress-1.0 {
48 db progress 1 "[namespace code {incr counter}] ; expr 0"
54 do_test progress-1.0.1 {
55 db progress
57 do_test progress-1.0.2 {
58 set v [catch {db progress xyz bogus} msg]
62 # Test that the query is abandoned when the progress callback returns non-zero
63 do_test progress-1.1 {
65 db progress 1 "[namespace code {incr counter}] ; expr 1"
72 # Test that the query is rolled back when the progress callback returns
74 do_test progress-1.2 {
77 db progress 1 "[namespace code {incr five_rows}] ; expr 0"
82 db progress 0 ""
87 # Now set up the progress callback to abandon the query after the number of
89 # some data will have been inserted into the table by the time the progress
91 db progress $five_rows "expr 1"
101 # after the progress query abandons a query.
105 do_test progress-1.3 {
107 db progress 0 ""
112 db progress 1 "expr 1"
116 db progress 0 ""
119 do_test progress-1.3.1 {
125 # Check that a value of 0 for N means no progress callback
126 do_test progress-1.4 {
128 db progress 0 "[namespace code {incr counter}] ; expr 0"
135 db progress 0 ""
137 # Make sure other queries can be run from within the progress
140 do_test progress-1.5 {
143 db progress 0 {}
147 db progress 10 set_rx
152 do_test progress-1.6 {
156 # Check that abandoning a query using the progress handler does
158 do_test progress-1.7 {
169 db progress 5 "expr 1"
171 db progress 5 "expr 0"