@@ -9,6 +9,12 @@ namespace SideBySide
9
9
{
10
10
public class CommandTimeoutTests : IClassFixture < DatabaseFixture > , IDisposable
11
11
{
12
+ #if BASELINE
13
+ const string c_timeoutMessage = "fatal error" ;
14
+ #else
15
+ const string c_timeoutMessage = "timeout" ;
16
+ #endif
17
+
12
18
public CommandTimeoutTests ( DatabaseFixture database )
13
19
{
14
20
m_database = database ;
@@ -73,17 +79,12 @@ public void CommandTimeoutWithSleepSync()
73
79
catch ( MySqlException ex )
74
80
{
75
81
sw . Stop ( ) ;
76
- Assert . Contains ( "timeout" , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
77
- #if ! BASELINE
78
- // https://bugs.mysql.com/bug.php?id=86009
82
+ Assert . Contains ( c_timeoutMessage , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
79
83
TestUtilities . AssertDuration ( sw , cmd . CommandTimeout * 1000 - 100 , 500 ) ;
80
- #endif
81
84
}
82
85
}
83
86
84
- #if ! BASELINE
85
87
Assert . Equal ( ConnectionState . Closed , m_connection . State ) ;
86
- #endif
87
88
}
88
89
89
90
[ Fact ]
@@ -104,17 +105,12 @@ public async Task CommandTimeoutWithSleepAsync()
104
105
catch ( MySqlException ex )
105
106
{
106
107
sw . Stop ( ) ;
107
- Assert . Contains ( "timeout" , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
108
- #if ! BASELINE
109
- // https://bugs.mysql.com/bug.php?id=86009
108
+ Assert . Contains ( c_timeoutMessage , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
110
109
TestUtilities . AssertDuration ( sw , cmd . CommandTimeout * 1000 - 100 , 500 ) ;
111
- #endif
112
110
}
113
111
}
114
112
115
- #if ! BASELINE
116
113
Assert . Equal ( ConnectionState . Closed , m_connection . State ) ;
117
- #endif
118
114
}
119
115
120
116
[ SkippableFact ( Baseline = "https://bugs.mysql.com/bug.php?id=87307" ) ]
@@ -154,9 +150,7 @@ public void MultipleCommandTimeoutWithSleepSync()
154
150
}
155
151
}
156
152
157
- #if ! BASELINE
158
153
Assert . Equal ( ConnectionState . Closed , m_connection . State ) ;
159
- #endif
160
154
}
161
155
162
156
[ SkippableFact ( Baseline = "https://bugs.mysql.com/bug.php?id=87307" ) ]
@@ -195,9 +189,7 @@ public async Task MultipleCommandTimeoutWithSleepAsync()
195
189
}
196
190
}
197
191
198
- #if ! BASELINE
199
192
Assert . Equal ( ConnectionState . Closed , m_connection . State ) ;
200
- #endif
201
193
}
202
194
203
195
[ SkippableFact ( Baseline = "https://bugs.mysql.com/bug.php?id=88124" ) ]
@@ -264,17 +256,12 @@ public void TransactionCommandTimeoutWithSleepSync()
264
256
catch ( MySqlException ex )
265
257
{
266
258
sw . Stop ( ) ;
267
- Assert . Contains ( "timeout" , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
268
- #if ! BASELINE
269
- // https://bugs.mysql.com/bug.php?id=86009
259
+ Assert . Contains ( c_timeoutMessage , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
270
260
TestUtilities . AssertDuration ( sw , cmd . CommandTimeout * 1000 - 100 , 500 ) ;
271
- #endif
272
261
}
273
262
}
274
263
275
- #if ! BASELINE
276
264
Assert . Equal ( ConnectionState . Closed , m_connection . State ) ;
277
- #endif
278
265
}
279
266
280
267
[ Fact ]
@@ -296,17 +283,11 @@ public async Task TransactionCommandTimeoutWithSleepAsync()
296
283
catch ( MySqlException ex )
297
284
{
298
285
sw . Stop ( ) ;
299
- Assert . Contains ( "timeout" , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
300
- #if ! BASELINE
301
- // https://bugs.mysql.com/bug.php?id=86009
302
- TestUtilities . AssertDuration ( sw , cmd . CommandTimeout * 1000 - 100 , 500 ) ;
303
- #endif
286
+ Assert . Contains ( c_timeoutMessage , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
304
287
}
305
288
}
306
289
307
- #if ! BASELINE
308
290
Assert . Equal ( ConnectionState . Closed , m_connection . State ) ;
309
- #endif
310
291
}
311
292
312
293
readonly DatabaseFixture m_database ;
0 commit comments