Add a db.Dispose before calling Delete on the SQLite database.

On Windows, you are not able to delete a file while there is
still a handle to it open.
0.6.0-stable
Homer Horwitz 2008-09-18 20:15:04 +00:00
parent 1c08f46ec3
commit e2564f2563
4 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,7 @@ namespace OpenSim.Data.SQLite.Tests
[TestFixtureTearDown] [TestFixtureTearDown]
public void Cleanup() public void Cleanup()
{ {
db.Dispose();
System.IO.File.Delete(file); System.IO.File.Delete(file);
} }
} }

View File

@ -64,6 +64,7 @@ namespace OpenSim.Data.SQLite.Tests
[TestFixtureTearDown] [TestFixtureTearDown]
public void Cleanup() public void Cleanup()
{ {
db.Dispose();
System.IO.File.Delete(file); System.IO.File.Delete(file);
} }
} }

View File

@ -55,7 +55,8 @@ namespace OpenSim.Data.SQLite.Tests
[TestFixtureTearDown] [TestFixtureTearDown]
public void Cleanup() public void Cleanup()
{ {
// System.IO.File.Delete(file); db.Dispose();
System.IO.File.Delete(file);
} }
} }
} }

View File

@ -55,6 +55,7 @@ namespace OpenSim.Data.SQLite.Tests
[TestFixtureTearDown] [TestFixtureTearDown]
public void Cleanup() public void Cleanup()
{ {
db.Dispose();
System.IO.File.Delete(file); System.IO.File.Delete(file);
} }
} }