-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallelize tests #17872
base: main
Are you sure you want to change the base?
Parallelize tests #17872
Changes from 5 commits
0ed0442
72ae0c6
612a7b3
f2795ee
d384a06
7a94530
e93a33e
47d9cdc
4a5ba8f
7359bdf
83c5b98
1ef5c8d
e665e79
efc4c28
1b00731
01cc1f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,7 +137,7 @@ module internal PervasiveAutoOpens = | |
type Async with | ||
|
||
static member RunImmediate(computation: Async<'T>, ?cancellationToken) = | ||
let cancellationToken = defaultArg cancellationToken Async.DefaultCancellationToken | ||
let cancellationToken = defaultArg cancellationToken CancellationToken.None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably never want the default token to cancel compiler jobs. |
||
|
||
let ts = TaskCompletionSource<'T>() | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -340,10 +340,11 @@ type Mailbox<'Msg>(cancellationSupported: bool, isThrowExceptionAfterDisposed: b | |
inboxStore.Clear() | ||
|
||
arrivals.Clear() | ||
isDisposed <- true) | ||
isDisposed <- true | ||
|
||
if isNotNull pulse then | ||
(pulse :> IDisposable).Dispose() | ||
if isNotNull pulse then | ||
(pulse :> IDisposable).Dispose() | ||
pulse <- null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a provisional fix for #17849 This is a core change that should be extracted to a PR and carefully thought through. |
||
|
||
#if DEBUG | ||
member x.UnsafeContents = (x.inbox, arrivals, pulse, savedCont) |> box | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,26 @@ | |
|
||
<PropertyGroup> | ||
<TargetFrameworks>net472;$(FSharpNetCoreProductTargetFramework)</TargetFrameworks> | ||
<TargetFrameworks Condition="'$(OS)' == 'Unix'">$(FSharpNetCoreProductTargetFramework)</TargetFrameworks> | ||
<TargetFrameworks Condition="'$(OS)' == 'Unix' or '$(BUILDING_USING_DOTNET)' == 'true'">$(FSharpNetCoreProductTargetFramework)</TargetFrameworks> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make the whole FSharp.sln work with BUILDING_USING_DOTNET |
||
<OutputType>Library</OutputType> | ||
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference> | ||
<UnitTestType>xunit</UnitTestType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="..\FSharp.Test.Utilities\XunitSetup.fs"> | ||
<Link>XunitSetup.fs</Link> | ||
</Compile> | ||
<Compile Include="WriteCodeFragmentTests.fs" /> | ||
<Compile Include="MapSourceRootsTests.fs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="xunit.runner.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(FSharpSourcesRoot)\FSharp.Build\FSharp.Build.fsproj" /> | ||
<ProjectReference Include="$(FSharpSourcesRoot)\FSharp.Core\FSharp.Core.fsproj" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", | ||
"appDomain": "denied", | ||
"parallelizeAssembly": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix. This was starting with a cancellation token but without catching the OCE.