File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
tests/FSharp.Test.Utilities Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 33namespace FSharp.Test
44
55open System.Threading
6+ open OpenTelemetry.Resources
67
78#nowarn " 57"
89
@@ -376,23 +377,25 @@ module CompilerAssertHelpers =
376377 let setup = AppDomainSetup( ApplicationBase = thisAssemblyDirectory)
377378 let testCaseDomain = AppDomain.CreateDomain( $" built app {assembly}" , null , setup)
378379
379- testCaseDomain.add _ AssemblyResolve ( fun _ args ->
380+ let handler = ResolveEventHandler ( fun _ args ->
380381 dependecies
381382 |> List.tryFind ( fun path -> Path.GetFileNameWithoutExtension path = AssemblyName( args.Name) .Name)
382383 |> Option.filter FileSystem.FileExistsShim
383384 |> Option.map Assembly.LoadFile
384385 |> Option.toObj
385386 )
386387
388+ testCaseDomain.add_ AssemblyResolve handler
389+
387390 let worker =
388391 ( testCaseDomain.CreateInstanceFromAndUnwrap( typeof< Worker>. Assembly.CodeBase, typeof< Worker>. FullName)) :?> Worker
389392
390393 let outcome , output , errors = worker.ExecuteTestCase assembly isFsx
391394 // Replay streams captured in appdomain.
392395 printf $" {output}"
393396 eprintf $" {errors}"
394-
395- AppDomain.Unload testCaseDomain
397+
398+ testCaseDomain.remove _ AssemblyResolve handler
396399
397400 outcome, output, errors
398401
You can’t perform that action at this time.
0 commit comments