提交 af45eef0 编写于 作者: G Gen Lu

Add a timebox test

上级 99877da6
......@@ -1253,6 +1253,32 @@ namespace Foo
await VerifyCustomCommitProviderAsync(markup, "MyClass", expectedCodeAfterCommit, sourceCodeKind: kind);
}
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
[WorkItem(36624, "https://github.com/dotnet/roslyn/issues/36624")]
public async Task DoNotShowImportItemsIfTimeout()
{
// Set timeout to 0 so it always timeout
AbstractTypeImportCompletionProvider.TimeoutInMilliseconds = 0;
var file1 = $@"
namespace NS1
{{
public class Bar
{{}}
}}";
var file2 = @"
namespace NS2
{
class C
{
$$
}
}";
var markup = CreateMarkupForSingleProject(file2, file1, LanguageNames.CSharp);
await VerifyTypeImportItemIsAbsentAsync(markup, "Bar", inlineDescription: "NS1");
}
private static void AssertRelativeOrder(List<string> expectedTypesInRelativeOrder, ImmutableArray<CompletionItem> allCompletionItems)
{
var hashset = new HashSet<string>(expectedTypesInRelativeOrder);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册