File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
test/Microsoft.Data.Sqlite.Tests Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -1315,18 +1315,13 @@ public void Open_releases_handle_when_constructor_fails()
1315
1315
1316
1316
Assert . Equal ( ConnectionState . Closed , connection . State ) ;
1317
1317
1318
- // Clear any pools that might hold connections
1319
- SqliteConnection . ClearPool ( connection ) ;
1320
-
1321
- // The file should be movable/deletable now (indicating handle was released)
1322
- // If there's a file handle leak, this will fail on Windows
1323
- var tempPath = dbPath + ".moved" ;
1324
- File . Move ( dbPath , tempPath ) ;
1325
- File . Delete ( tempPath ) ;
1318
+ // The file should be deletable now (indicating handle was released)
1319
+ // If there's a file handle leak, this will fail
1320
+ File . Delete ( dbPath ) ;
1326
1321
}
1327
1322
finally
1328
1323
{
1329
- // Clean up
1324
+ // Clean up - file may already be deleted by the test
1330
1325
if ( File . Exists ( dbPath ) )
1331
1326
{
1332
1327
File . Delete ( dbPath ) ;
@@ -1355,9 +1350,6 @@ public void Open_releases_handle_when_opening_invalid_file()
1355
1350
// Should be some kind of error - we don't care about the specific code
1356
1351
Assert . True ( ex . SqliteErrorCode != 0 ) ;
1357
1352
Assert . Equal ( ConnectionState . Closed , connection . State ) ;
1358
-
1359
- // Clear any pools that might hold connections
1360
- SqliteConnection . ClearPool ( connection ) ;
1361
1353
}
1362
1354
finally
1363
1355
{
You can’t perform that action at this time.
0 commit comments