Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

TaskCancelledException discovering tests #2982

Closed
@rynowak

Description

@rynowak

DTH is throwing every time while trying to load an assembly for test discovery. I hit this consistently with MVC.NoFun.sln and DNX 1.0.0-rc1-15899

Exception: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Microsoft.Dnx.Compilation.DesignTime.DesignTimeHostProjectCompiler.CompileProject(CompilationProjectContext projectContext, Func`1 referenceResolver, Func`1 resourcesResolver)
   at Microsoft.Dnx.Compilation.LibraryExporter.<>c__DisplayClass17_0.<ExportProject>b__0(CacheContext ctx)
   at Microsoft.Dnx.Compilation.Caching.CacheExtensions.<>c__DisplayClass0_0`1.<Get>b__0(CacheContext ctx)
   at Microsoft.Dnx.Compilation.Caching.Cache.CreateEntry(Object k, Func`2 acquire)
   at Microsoft.Dnx.Compilation.Caching.Cache.<>c__DisplayClass5_0.<AddEntry>b__0()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.Dnx.Compilation.Caching.Cache.Get(Object key, Func`2 factory)
   at Microsoft.Dnx.Compilation.Caching.CacheExtensions.Get[T](ICache cache, Object key, Func`2 factory)
   at Microsoft.Dnx.Compilation.LibraryExporter.ExportProject(ProjectDescription project, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(LibraryDescription library, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(String name, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(String name)
   at Microsoft.Dnx.Runtime.Compilation.RuntimeLibraryExporter.GetExport(String name)
   at Microsoft.Dnx.TestHost.TestServices.CreateTestServices(IServiceProvider applicationServices, Project project, ReportingChannel channel)
   at Microsoft.Dnx.TestHost.Program.<>c__DisplayClass2_0.<<Main>b__0>d.MoveNext()
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---

   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Web.UnitTest.TestAdapter.Discovery.HostExtensions.GetTests(IHost host, ITestCaseDiscoverySink discovery, IMessageLogger logger, KRuntimeConfiguration testConfiguration)
   at Microsoft.VisualStudio.Web.UnitTest.TestAdapter.KUnitTestDiscoverer.GetTestCases(IEnumerable`1 sources, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)
---> (Inner Exception #0) System.InvalidOperationException: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Microsoft.Dnx.Compilation.DesignTime.DesignTimeHostProjectCompiler.CompileProject(CompilationProjectContext projectContext, Func`1 referenceResolver, Func`1 resourcesResolver)
   at Microsoft.Dnx.Compilation.LibraryExporter.<>c__DisplayClass17_0.<ExportProject>b__0(CacheContext ctx)
   at Microsoft.Dnx.Compilation.Caching.CacheExtensions.<>c__DisplayClass0_0`1.<Get>b__0(CacheContext ctx)
   at Microsoft.Dnx.Compilation.Caching.Cache.CreateEntry(Object k, Func`2 acquire)
   at Microsoft.Dnx.Compilation.Caching.Cache.<>c__DisplayClass5_0.<AddEntry>b__0()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.Dnx.Compilation.Caching.Cache.Get(Object key, Func`2 factory)
   at Microsoft.Dnx.Compilation.Caching.CacheExtensions.Get[T](ICache cache, Object key, Func`2 factory)
   at Microsoft.Dnx.Compilation.LibraryExporter.ExportProject(ProjectDescription project, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(LibraryDescription library, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(String name, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(String name)
   at Microsoft.Dnx.Runtime.Compilation.RuntimeLibraryExporter.GetExport(String name)
   at Microsoft.Dnx.TestHost.TestServices.CreateTestServices(IServiceProvider applicationServices, Project project, ReportingChannel channel)
   at Microsoft.Dnx.TestHost.Program.<>c__DisplayClass2_0.<<Main>b__0>d.MoveNext()
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---
<---

========== Discover test finished: 0 found (0:00:01.356003) ==========

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions