@@ -37,7 +37,7 @@ public void Execute(int step, int method)
37
37
connection . Open ( ) ;
38
38
using var command = connection . CreateCommand ( ) ;
39
39
command . CommandTimeout = 1 ;
40
- command . CommandText = $ "SELECT 0, 4000, { step } , 1 ;";
40
+ command . CommandText = $ "SELECT 0, 4000, { step } , 0 ;";
41
41
var stopwatch = Stopwatch . StartNew ( ) ;
42
42
var ex = Assert . Throws < MySqlException > ( ( ) => s_executeMethods [ method ] ( command ) ) ;
43
43
Assert . InRange ( stopwatch . ElapsedMilliseconds , 900 , 1500 ) ;
@@ -59,7 +59,7 @@ public async Task ExecuteAsyncs(int step, int method)
59
59
connection . Open ( ) ;
60
60
using var command = connection . CreateCommand ( ) ;
61
61
command . CommandTimeout = 1 ;
62
- command . CommandText = $ "SELECT 0, 4000, { step } , 1 ;";
62
+ command . CommandText = $ "SELECT 0, 4000, { step } , 0 ;";
63
63
var stopwatch = Stopwatch . StartNew ( ) ;
64
64
var ex = await Assert . ThrowsAsync < MySqlException > ( async ( ) => await s_executeAsyncMethods [ method ] ( command , default ) ) ;
65
65
Assert . InRange ( stopwatch . ElapsedMilliseconds , 900 , 1500 ) ;
@@ -84,7 +84,7 @@ public void Execute(int step, int method)
84
84
connection . Open ( ) ;
85
85
using var command = connection . CreateCommand ( ) ;
86
86
command . CommandTimeout = 10 ;
87
- command . CommandText = $ "SELECT 0, 4000, { step } , 1 ;";
87
+ command . CommandText = $ "SELECT 0, 4000, { step } , 0 ;";
88
88
var task = Task . Run ( async ( ) =>
89
89
{
90
90
await Task . Delay ( TimeSpan . FromSeconds ( 1 ) ) ;
@@ -111,7 +111,7 @@ public async Task ExecuteAsync(int step, int method)
111
111
connection . Open ( ) ;
112
112
using var command = connection . CreateCommand ( ) ;
113
113
command . CommandTimeout = 10 ;
114
- command . CommandText = $ "SELECT 0, 4000, { step } , 1 ;";
114
+ command . CommandText = $ "SELECT 0, 4000, { step } , 0 ;";
115
115
var task = Task . Run ( async ( ) =>
116
116
{
117
117
await Task . Delay ( TimeSpan . FromSeconds ( 1 ) ) ;
@@ -141,7 +141,7 @@ public async Task Test(int step, int method)
141
141
connection . Open ( ) ;
142
142
using var command = connection . CreateCommand ( ) ;
143
143
command . CommandTimeout = 0 ;
144
- command . CommandText = $ "SELECT 0, 4000, { step } , 1 ;";
144
+ command . CommandText = $ "SELECT 0, 4000, { step } , 0 ;";
145
145
using var source = new CancellationTokenSource ( TimeSpan . FromSeconds ( 1 ) ) ;
146
146
var stopwatch = Stopwatch . StartNew ( ) ;
147
147
var ex = await Assert . ThrowsAsync < OperationCanceledException > ( async ( ) => await s_executeAsyncMethods [ method ] ( command , source . Token ) ) ;
@@ -166,7 +166,7 @@ public void Test(int step, int method)
166
166
connection . Open ( ) ;
167
167
using var command = connection . CreateCommand ( ) ;
168
168
command . CommandTimeout = 1 ;
169
- command . CommandText = $ "SELECT 42, 100, { step } , 1 ;";
169
+ command . CommandText = $ "SELECT 42, 100, { step } , 0 ;";
170
170
var stopwatch = Stopwatch . StartNew ( ) ;
171
171
var result = s_executeMethods [ method ] ( command ) ;
172
172
if ( method == 1 )
@@ -187,7 +187,7 @@ public async Task Test(int step, int method)
187
187
connection . Open ( ) ;
188
188
using var command = connection . CreateCommand ( ) ;
189
189
command . CommandTimeout = 0 ;
190
- command . CommandText = $ "SELECT 42, 100, { step } , 1 ;";
190
+ command . CommandText = $ "SELECT 42, 100, { step } , 0 ;";
191
191
using var source = new CancellationTokenSource ( TimeSpan . FromSeconds ( 1 ) ) ;
192
192
var stopwatch = Stopwatch . StartNew ( ) ;
193
193
var result = await s_executeAsyncMethods [ method ] ( command , source . Token ) ;
@@ -210,7 +210,7 @@ public void Timeout(int method)
210
210
connection . Open ( ) ;
211
211
using var command = connection . CreateCommand ( ) ;
212
212
command . CommandTimeout = 1 ;
213
- command . CommandText = $ "SELECT 0, 100, -1, 1 ;";
213
+ command . CommandText = $ "SELECT 0, 100, -1, 0 ;";
214
214
var stopwatch = Stopwatch . StartNew ( ) ;
215
215
var ex = Assert . Throws < MySqlException > ( ( ) => s_executeMethods [ method ] ( command ) ) ;
216
216
Assert . InRange ( stopwatch . ElapsedMilliseconds , 900 , 1500 ) ;
@@ -227,7 +227,7 @@ public void NoTimeout(int method)
227
227
connection . Open ( ) ;
228
228
using var command = connection . CreateCommand ( ) ;
229
229
command . CommandTimeout = 1 ;
230
- command . CommandText = $ "SELECT 42, 100, -1, 1 ;";
230
+ command . CommandText = $ "SELECT 42, 100, -1, 0 ;";
231
231
var stopwatch = Stopwatch . StartNew ( ) ;
232
232
var result = s_executeMethods [ method ] ( command ) ;
233
233
Assert . Equal ( 42 , result ) ;
@@ -246,7 +246,7 @@ public async Task Timeout(int method)
246
246
connection . Open ( ) ;
247
247
using var command = connection . CreateCommand ( ) ;
248
248
command . CommandTimeout = 1 ;
249
- command . CommandText = $ "SELECT 0, 100, -1, 1 ;";
249
+ command . CommandText = $ "SELECT 0, 100, -1, 0 ;";
250
250
var stopwatch = Stopwatch . StartNew ( ) ;
251
251
var ex = await Assert . ThrowsAsync < MySqlException > ( async ( ) => await s_executeAsyncMethods [ method ] ( command , default ) ) ;
252
252
Assert . InRange ( stopwatch . ElapsedMilliseconds , 900 , 1500 ) ;
@@ -263,7 +263,7 @@ public async Task NoTimeout(int method)
263
263
connection . Open ( ) ;
264
264
using var command = connection . CreateCommand ( ) ;
265
265
command . CommandTimeout = 1 ;
266
- command . CommandText = $ "SELECT 42, 100, -1, 1 ;";
266
+ command . CommandText = $ "SELECT 42, 100, -1, 0 ;";
267
267
var stopwatch = Stopwatch . StartNew ( ) ;
268
268
var result = await s_executeAsyncMethods [ method ] ( command , default ) ;
269
269
Assert . Equal ( 42 , result ) ;
@@ -281,7 +281,7 @@ public void Test(int step, int method)
281
281
connection . Open ( ) ;
282
282
using var command = connection . CreateCommand ( ) ;
283
283
command . CommandTimeout = 1 ;
284
- command . CommandText = $ "SELECT 0, 10000, { step } , 0 ;";
284
+ command . CommandText = $ "SELECT 0, 10000, { step } , 1 ;";
285
285
var stopwatch = Stopwatch . StartNew ( ) ;
286
286
var ex = Assert . Throws < MySqlException > ( ( ) => s_executeMethods [ method ] ( command ) ) ;
287
287
Assert . InRange ( stopwatch . ElapsedMilliseconds , 2900 , 3500 ) ;
@@ -303,7 +303,7 @@ public async Task Test(int step, int method)
303
303
connection . Open ( ) ;
304
304
using var command = connection . CreateCommand ( ) ;
305
305
command . CommandTimeout = 1 ;
306
- command . CommandText = $ "SELECT 0, 10000, { step } , 0 ;";
306
+ command . CommandText = $ "SELECT 0, 10000, { step } , 1 ;";
307
307
var stopwatch = Stopwatch . StartNew ( ) ;
308
308
var ex = await Assert . ThrowsAsync < MySqlException > ( async ( ) => await s_executeAsyncMethods [ method ] ( command , default ) ) ;
309
309
Assert . InRange ( stopwatch . ElapsedMilliseconds , 2900 , 3500 ) ;
@@ -326,7 +326,7 @@ public void Execute(int step, int method)
326
326
connection . Open ( ) ;
327
327
using var command = connection . CreateCommand ( ) ;
328
328
command . CommandTimeout = 1 ;
329
- command . CommandText = $ "SELECT 0, 10000, { step } , 0 ;";
329
+ command . CommandText = $ "SELECT 0, 10000, { step } , 1 ;";
330
330
var stopwatch = Stopwatch . StartNew ( ) ;
331
331
var ex = Assert . Throws < MySqlException > ( ( ) => s_executeMethods [ method ] ( command ) ) ;
332
332
Assert . InRange ( stopwatch . ElapsedMilliseconds , 900 , 1500 ) ;
@@ -346,7 +346,7 @@ public async Task ExecuteAsync(int step, int method)
346
346
connection . Open ( ) ;
347
347
using var command = connection . CreateCommand ( ) ;
348
348
command . CommandTimeout = 1 ;
349
- command . CommandText = $ "SELECT 0, 10000, { step } , 0 ;";
349
+ command . CommandText = $ "SELECT 0, 10000, { step } , 1 ;";
350
350
var stopwatch = Stopwatch . StartNew ( ) ;
351
351
var ex = await Assert . ThrowsAsync < MySqlException > ( async ( ) => await s_executeAsyncMethods [ method ] ( command , default ) ) ;
352
352
Assert . InRange ( stopwatch . ElapsedMilliseconds , 900 , 1500 ) ;
0 commit comments