mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-10 10:12:39 -05:00
Fix file browser cancel/connetion issues (#528)
* clean bindingqueue after cancel * fileborwser fixes * code cleanup * re-initialize filetree whenever filter is changed * fix test issues * address pr comments
This commit is contained in:
@@ -91,9 +91,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.FileBrowser
|
||||
};
|
||||
|
||||
await service.HandleFileBrowserCloseRequest(inputParams, requestContext.Object);
|
||||
|
||||
// Result should return false since it's trying to close a filebrowser that was never opened
|
||||
requestContext.Verify(x => x.SendResult(It.Is<FileBrowserCloseResponse>(p => p.Succeeded == false)));
|
||||
requestContext.Verify(x => x.SendResult(It.Is<FileBrowserCloseResponse>(p => p.Succeeded == true)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.FileBrowser
|
||||
[Fact]
|
||||
public void FilterFilesTest()
|
||||
{
|
||||
FileBrowserOperation operation = new FileBrowserOperation();
|
||||
FileBrowserOperation operation = new FileBrowserOperation(null, "", null);
|
||||
string[] supportedFilePaths = new string[] {"te\\s/t1.txt", "te!s.t2.bak" };
|
||||
string[] unsupportedFilePaths = new string[] { "te.s*/t3.jpg", "t_est4.trn" };
|
||||
string[] filters = new string[] { "*.txt", "*.bak"};
|
||||
@@ -47,7 +47,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.FileBrowser
|
||||
[Fact]
|
||||
public void ExpandNodeShouldThrowExceptionForInvalidPath()
|
||||
{
|
||||
FileBrowserOperation operation = new FileBrowserOperation();
|
||||
FileBrowserOperation operation = new FileBrowserOperation(null, "", null);
|
||||
Exception exception = null;
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user