mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Fix for Crash due to System.AccessViolationException when calling OleDBSearch from multiple threads. (#6052)
* Removing non thread safe member variables, as well as the check to ensure that they have been disposed. * Removing 'ExecuteQuery_ShouldDisposeAllConnections_AfterFunctionCall'. This call previously required the use of member variables that were not thread safe. There is no reason to share this state across threads. Arguably this test verifies an internal implementation detail and is not suitable for a unit test anyway.
This commit is contained in:
committed by
GitHub
parent
64106cba82
commit
2390368d03
@@ -164,22 +164,6 @@ namespace Wox.Test.Plugins
|
||||
Assert.IsTrue(queryHelper.QueryWhereRestrictions.Contains("Contains"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("This method is throwing the follwoing exception in CI. Ignoring temporarily until I understand why. Can't repro locally. System.Data.OleDb.OleDbException : IErrorInfo.GetDescription failed with E_FAIL(0x80004005).")]
|
||||
public void ExecuteQuery_ShouldDisposeAllConnections_AfterFunctionCall()
|
||||
{
|
||||
// Arrange
|
||||
OleDBSearch oleDbSearch = new OleDBSearch();
|
||||
WindowsSearchAPI api = new WindowsSearchAPI(oleDbSearch);
|
||||
var mockSearchManager = GetMockSearchManager();
|
||||
|
||||
// Act
|
||||
api.Search("FilePath", mockSearchManager);
|
||||
|
||||
// Assert
|
||||
Assert.IsTrue(oleDbSearch.HaveAllDisposableItemsBeenDisposed());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WindowsSearchAPI_ShouldReturnResults_WhenSearchWasExecuted()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user