Skip to content

Commit 47eab8b

Browse files
T-Grogithub-actions
authored andcommitted
workaround xunit bug that treat displayname as if it were a unique ID
1 parent 29abb60 commit 47eab8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/FSharp.Test.Utilities/XunitHelpers.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,14 @@ module TestCaseCustomizations =
8585
let hash = sha.ComputeHash(bytes)
8686
System.Guid(hash.[0..15]) // Take first 16 bytes for GUID
8787

88+
let newDisplayName = $"{oldTestCollection.DisplayName}_{collectionId:N}"
89+
8890
// Create a new collection with a unique id for the test case.
8991
let newTestCollection =
9092
new TestCollection(
9193
oldTestCollection.TestAssembly,
9294
oldTestCollection.CollectionDefinition,
93-
oldTestCollection.DisplayName,
95+
newDisplayName,
9496
collectionId
9597
)
9698

0 commit comments

Comments
 (0)