Skip to content

Commit

Permalink
Several attempts at troubleshooting CI issue, see log details and #25
Browse files Browse the repository at this point in the history
Revert "Troubleshooting CI, remove OfXXX, CE, Other and ToXXX"

This reverts commit 6856b9e.

Turn TaskSeq.empty into a unit-function

Troubleshooting CI, remove Item, Pick, CE

Revert "Troubleshooting CI, remove Item, Pick, CE"

This reverts commit bc6c260.

Several attempts at troubleshooting CI issue, see log details and #25

Temporarily killing most tests, to troubleshoot hanging CI

Revert "Temporarily killing most tests, to troubleshoot hanging CI"

This reverts commit b84fff1.

Troubleshooting CI, adding back several new tests

Temporarily killing most tests, to troubleshoot hanging CI

Revert "Temporarily killing most tests, to troubleshoot hanging CI"

This reverts commit b84fff1.

Troubleshooting CI, adding back several new tests

Revert "Troubleshooting CI, adding back several new tests"

This reverts commit 5ecf179.

Troubleshooting CI, re-enabling only some tests, including new perf tests

Revert "Troubleshooting CI, re-enabling only some tests, including new perf tests"

This reverts commit 602cb3a.

Troubleshooting CI, removing only the new perf tests

Revert "Troubleshooting CI, removing only the new perf tests"

This reverts commit d16f739.

Troubleshooting CI, up until Iter is included

Revert "Troubleshooting CI, up until Iter is included"

This reverts commit 7f63395.

Troubleshooting CI, up until Iter is removed (excluded)

This reverts commit 7f63395.

Revert "Troubleshooting CI, up until Iter is removed (excluded)"

This reverts commit 32d463b.

Troubleshooting CI, tests for Last, Map and Pick excluded

Revert "Troubleshooting CI, tests for Last, Map and Pick excluded"

This reverts commit 9132fee.

Troubleshooting CI: remove all tests but Choose tests

Troubleshooting CI, add hang timeout test

Revert "Troubleshooting CI: remove all tests but Choose tests"

This reverts commit 93cfda5.

Troubleshooting CI, removing deliberately hanging test, leave blame-detection in test.yaml

Troubleshooting hanging CI: order test cases (currently only within a class, not sure how to change it)

Troubleshooting CI, re-enable parallelization of tests and clean code
  • Loading branch information
abelbraaksma committed Oct 14, 2022
1 parent 40dd31c commit e743e9a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-dotnet@v3
# build it, test it, pack it
- name: Run dotnet test - release
run: dotnet test -c Release --logger "trx;LogFileName=test-results-release.trx" --logger "console;verbosity=detailed" .\src\FSharpy.TaskSeq.Test\FSharpy.TaskSeq.Test.fsproj
run: dotnet test -c Release --blame-hang-timeout 15000ms --logger "trx;LogFileName=test-results-release.trx" --logger "console;verbosity=detailed" .\src\FSharpy.TaskSeq.Test\FSharpy.TaskSeq.Test.fsproj
- name: Publish test results - release
uses: dorny/test-reporter@v1
if: always()
Expand All @@ -41,7 +41,7 @@ jobs:
uses: actions/setup-dotnet@v3
# build it, test it, pack it
- name: Run dotnet test - debug
run: dotnet test -c Debug --logger "trx;LogFileName=test-results-debug.trx" --logger "console;verbosity=detailed" .\src\FSharpy.TaskSeq.Test\FSharpy.TaskSeq.Test.fsproj
run: dotnet test -c Debug --blame-hang-timeout 15000ms --logger "trx;LogFileName=test-results-debug.trx" --logger "console;verbosity=detailed" .\src\FSharpy.TaskSeq.Test\FSharpy.TaskSeq.Test.fsproj
- name: Publish test results - debug
uses: dorny/test-reporter@v1
if: always()
Expand Down
8 changes: 8 additions & 0 deletions src/FSharpy.TaskSeq.Test/AssemblyInfo.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace FSharpy.Tests

open System.Runtime.CompilerServices

[<assembly: Xunit.CollectionBehavior(DisableTestParallelization = false)>]
[<assembly: Xunit.TestCaseOrderer("FSharpy.Tests.AlphabeticalOrderer", "FSharpy.TaskSeq.Test")>]

do ()
3 changes: 2 additions & 1 deletion src/FSharpy.TaskSeq.Test/FSharpy.TaskSeq.Test.fsproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -8,6 +8,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Nunit.Extensions.fs" />
<Compile Include="TestUtils.fs" />
<Compile Include="TaskSeq.Choose.Tests.fs" />
Expand Down
12 changes: 11 additions & 1 deletion src/FSharpy.TaskSeq.Test/Nunit.Extensions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ open FsUnit
open NHamcrest.Core
open Microsoft.FSharp.Reflection

open FsToolkit.ErrorHandling
open Xunit
open Xunit.Sdk

type AlphabeticalOrderer() =
interface ITestCaseOrderer with
override this.OrderTestCases(testCases) =
testCases
|> Seq.sortBy (fun testCase ->
// sorting (or getting) the type fails
// and as soon as this method fails, no tests are discovered
testCase.TestMethod.Method.Name)

open FsToolkit.ErrorHandling

[<AutoOpen>]
module ExtraCustomMatchers =
Expand Down
8 changes: 8 additions & 0 deletions src/FSharpy.TaskSeq.Test/TaskSeq.Choose.Tests.fs
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
module FSharpy.Tests.Choose

open System
open System.Threading.Tasks

open Xunit
open FsUnit.Xunit
open FsToolkit.ErrorHandling

open FSharpy

[<Fact>]
let ``ZHang timeout test`` () = task {
let! empty = Task.Delay 30

empty |> should be Null
}

[<Fact>]
let ``TaskSeq-choose on an empty sequence`` () = task {
Expand Down

0 comments on commit e743e9a

Please sign in to comment.