From 9b853ad0af1bc9401677afa24a3ddeedb9ba7013 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:29:33 +0100 Subject: [PATCH 1/2] fix flaky --- .../AttributeUsage/AttributeUsage.fs | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index 9b7cdc5a053..a28d6175642 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -34,21 +34,23 @@ module CustomAttributes_AttributeUsage = |> verifyCompileAndRun |> shouldSucceed - // SOURCE=AssemblyVersion03.fs # AssemblyVersion03.fs - [] - let ``AssemblyVersion03_fs`` compilation = - compilation - |> withOptions ["--nowarn:52"] - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=AssemblyVersion04.fs # AssemblyVersion04.fs - [] - let ``AssemblyVersion04_fs`` compilation = - compilation - |> withOptions ["--nowarn:52"] - |> verifyCompileAndRun - |> shouldSucceed + [] + module TimeCritical = + // SOURCE=AssemblyVersion03.fs # AssemblyVersion03.fs + [] + let ``AssemblyVersion03_fs`` compilation = + compilation + |> withOptions ["--nowarn:52"] + |> verifyCompileAndRun + |> shouldSucceed + + // SOURCE=AssemblyVersion04.fs # AssemblyVersion04.fs + [] + let ``AssemblyVersion04_fs`` compilation = + compilation + |> withOptions ["--nowarn:52"] + |> verifyCompileAndRun + |> shouldSucceed // SOURCE=AttributeTargetsIsCtor01.fs # AttributeTargetsIsCtor01.fs [] From b9b04046505b943ce5eeaddf99c6d6788ec249d1 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:29:41 +0100 Subject: [PATCH 2/2] meniton in devguide --- DEVGUIDE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 2ca137ba100..28b511fac04 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -243,6 +243,16 @@ or > Please note, that by default, **Release** version of IL baseline tests will be running in CI, so when updating baseline (.bsl) files, make sure to add `-c Release` flag to the build command. +### Parallel execution of tests + +Tests utilizing xUnit framework by default run in parallel. If your tests depend on some shared state or are time-critical, you can add the module to predefined `NotThreadSafeResourceCollection` to prevent parallel execution. +For example: +```fsharp +[] +module TimeCritical = +``` + + ### Updating FCS surface area baselines ```bash