Skip to content

Commit 95cff6b

Browse files
authored
Skip flaky test (#18051)
1 parent 373fb23 commit 95cff6b

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let internal recordAllEvents groupBy =
5151
let getFileNameKey (_l, (f: string, _p), _) = Path.GetFileName f
5252

5353
// TODO: currently the label for DependecyGraph cache is $"%d{fileSnapshots.Length} files ending with {lastFile}"
54-
let getDependecyGraphKey (_l, _, _) = failwith "not implemented"
54+
let getDependecyGraphKey (_l, _, _) = failwith "not implemented"
5555

5656
let internal recordEvents groupBy =
5757
let observe, getEvents = recordAllEvents groupBy
@@ -293,7 +293,7 @@ let ``We don't check files that are not depended on`` () =
293293

294294
let observe, check = recordEvents getFileNameKey
295295

296-
ProjectWorkflowBuilder(project, useTransparentCompiler = true) {
296+
ProjectWorkflowBuilder(project, useTransparentCompiler = true) {
297297
withChecker (observe _.TcIntermediate)
298298
updateFile "First" updatePublicSurface
299299
checkFile "Last" expectOk
@@ -448,7 +448,7 @@ let fuzzingTest seed (project: SyntheticProject) = task {
448448

449449
let builder = ProjectWorkflowBuilder(project, useTransparentCompiler = true, autoStart = false)
450450
let checker = builder.Checker
451-
451+
452452
// Force creation and caching of options
453453
do! SaveAndCheckProject project checker false |> Async.Ignore
454454

@@ -600,7 +600,7 @@ let fuzzingTest seed (project: SyntheticProject) = task {
600600
builder.DeleteProjectDir()
601601
}
602602
603-
[<Theory>]
603+
[<Theory(Skip="TODO: this sometimes fails, needs investigation")>]
604604
[<InlineData(SignatureFiles.Yes)>]
605605
[<InlineData(SignatureFiles.No)>]
606606
[<InlineData(SignatureFiles.Some)>]
@@ -712,7 +712,7 @@ let ``What happens if bootstrapInfoStatic needs to be recomputed`` _ =
712712
giraffeProject.Workflow {
713713
updateFile "Helpers" (fun f -> { f with SignatureFile = Custom (f.SignatureFile.CustomText + "\n") })
714714
checkFile "EndpointRouting" expectOk
715-
withChecker (fun checker ->
715+
withChecker (fun checker ->
716716
async {
717717
checker.Caches.BootstrapInfoStatic.Clear()
718718
checker.Caches.BootstrapInfo.Clear()
@@ -722,7 +722,7 @@ let ``What happens if bootstrapInfoStatic needs to be recomputed`` _ =
722722
})
723723
updateFile "Core" (fun f -> { f with SignatureFile = Custom (f.SignatureFile.CustomText + "\n") })
724724
checkFile "EndpointRouting" expectOk
725-
}
725+
}
726726

727727

728728
module ParsedInputHashing =
@@ -776,7 +776,7 @@ let ``TypeCheck last file in project with transparent compiler`` useTransparentC
776776
let responseFile = FileInfo responseFile
777777
let syntheticProject = mkSyntheticProjectForResponseFile responseFile
778778

779-
let workflow =
779+
let workflow =
780780
ProjectWorkflowBuilder(
781781
syntheticProject,
782782
isExistingProject = true,
@@ -793,7 +793,7 @@ let ``TypeCheck last file in project with transparent compiler`` useTransparentC
793793
| Some lastFile ->
794794

795795
workflow {
796-
clearCache
796+
clearCache
797797
checkFile lastFile expectOk
798798
}
799799

@@ -803,13 +803,13 @@ let ``LoadClosure for script is computed once`` () =
803803
sourceFile "First" [])
804804

805805
let observe, getEvents = recordAllEvents getFileNameKey
806-
806+
807807
ProjectWorkflowBuilder(project, useTransparentCompiler = true) {
808808
withChecker (observe _.ScriptClosure)
809809
checkFile "First" expectOk
810810
}
811811
|> ignore
812-
812+
813813
Assert.Empty(getEvents())
814814

815815
[<Fact>]
@@ -819,7 +819,7 @@ let ``LoadClosure for script is recomputed after changes`` () =
819819
sourceFile "First" [])
820820

821821
let observe, check = recordEvents getFileNameKey
822-
822+
823823
ProjectWorkflowBuilder(project, useTransparentCompiler = true) {
824824
withChecker (observe _.ScriptClosure)
825825
checkFile "First" expectOk
@@ -830,12 +830,12 @@ let ``LoadClosure for script is recomputed after changes`` () =
830830
} |> ignore
831831

832832
check (fileName "First") [Weakened; Requested; Started; Finished; Weakened; Requested; Started; Finished]
833-
833+
834834
[<Fact>]
835835
let ``TryGetRecentCheckResultsForFile returns None before first call to ParseAndCheckFileInProject`` () =
836836
let project = SyntheticProject.Create(
837837
sourceFile "First" [])
838-
838+
839839
ProjectWorkflowBuilder(project) {
840840
clearCache
841841
tryGetRecentCheckResults "First" expectNone
@@ -845,7 +845,7 @@ let ``TryGetRecentCheckResultsForFile returns None before first call to ParseAnd
845845
let ``TryGetRecentCheckResultsForFile returns result after first call to ParseAndCheckFileInProject`` () =
846846
let project = SyntheticProject.Create(
847847
sourceFile "First" [] )
848-
848+
849849
ProjectWorkflowBuilder(project) {
850850
tryGetRecentCheckResults "First" expectSome
851851
} |> ignore
@@ -854,21 +854,21 @@ let ``TryGetRecentCheckResultsForFile returns result after first call to ParseAn
854854
let ``TryGetRecentCheckResultsForFile returns no result after edit`` () =
855855
let project = SyntheticProject.Create(
856856
sourceFile "First" [])
857-
857+
858858
ProjectWorkflowBuilder(project) {
859859
tryGetRecentCheckResults "First" expectSome
860860
updateFile "First" updatePublicSurface
861861
tryGetRecentCheckResults "First" expectNone
862862
checkFile "First" expectOk
863863
tryGetRecentCheckResults "First" expectSome
864864
} |> ignore
865-
865+
866866
[<Fact>]
867867
let ``TryGetRecentCheckResultsForFile returns result after edit of other file`` () =
868868
let project = SyntheticProject.Create(
869869
sourceFile "First" [],
870870
sourceFile "Second" ["First"])
871-
871+
872872
ProjectWorkflowBuilder(project) {
873873
tryGetRecentCheckResults "First" expectSome
874874
tryGetRecentCheckResults "Second" expectSome
@@ -901,7 +901,7 @@ let ``Unused warning should still produce after parse warning`` useTransparentCo
901901
// There should be parse warning because of the space in the file name:
902902
// warning FS0221: The declarations in this file will be placed in an implicit module 'As 01' based on the file name 'As 01.fs'.
903903
// However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.
904-
904+
905905
let project =
906906
{ SyntheticProject.Create(
907907
{ sourceFile "As 01" [] with
@@ -914,7 +914,7 @@ do
914914
printfn "Hello from F#"
915915
"""
916916
SignatureFile = No
917-
917+
918918
}) with
919919
AutoAddModules = false
920920
OtherOptions = [
@@ -939,7 +939,7 @@ printfn "Hello from F#"
939939
checkResults.Diagnostics
940940
|> Array.exists (fun diag -> diag.Severity = FSharpDiagnosticSeverity.Warning && diag.ErrorNumber = 1182)
941941
Assert.True(hasCheckWarning, "Expected post inference warning FS1182")
942-
942+
943943
ProjectWorkflowBuilder(project, useTransparentCompiler = useTransparentCompiler) {
944944
checkFile "As 01" expectTwoWarnings
945945
}
@@ -959,12 +959,12 @@ type private LoadClosureTestShim(currentFileSystem: IFileSystem) =
959959
let mutable bDidUpdate = false
960960
let asStream (v:string) = new MemoryStream(System.Text.Encoding.UTF8.GetBytes v)
961961
let knownFiles = set [ "a.fsx"; "b.fsx"; "c.fsx" ]
962-
962+
963963
member val aFsx = "#load \"b.fsx\""
964964
member val bFsxInitial = ""
965965
member val bFsxUpdate = "#load \"c.fsx\""
966966
member val cFsx = ""
967-
967+
968968
member x.DocumentSource (fileName: string) =
969969
async {
970970
if not (knownFiles.Contains fileName) then
@@ -978,7 +978,7 @@ type private LoadClosureTestShim(currentFileSystem: IFileSystem) =
978978
}
979979

980980
member x.UpdateB () = bDidUpdate <- true
981-
981+
982982
override _.FileExistsShim(path) =
983983
if knownFiles.Contains path then true else currentFileSystem.FileExistsShim(path)
984984
override _.GetFullPathShim(fileName) =
@@ -996,7 +996,7 @@ type private LoadClosureTestShim(currentFileSystem: IFileSystem) =
996996
)
997997

998998
module TestsMutatingFileSystem =
999-
999+
10001000
[<Theory>]
10011001
[<InlineData(false)>]
10021002
[<InlineData(true)>]
@@ -1010,7 +1010,7 @@ module TestsMutatingFileSystem =
10101010
if System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework") then
10111011
None
10121012
else
1013-
Some false
1013+
Some false
10141014

10151015
try
10161016
let checker = FSharpChecker.Create(useTransparentCompiler = useTransparentCompiler)
@@ -1034,7 +1034,7 @@ module TestsMutatingFileSystem =
10341034
match snd checkResults with
10351035
| FSharpCheckFileAnswer.Aborted -> failwith "Did not expected FSharpCheckFileAnswer.Aborted"
10361036
| FSharpCheckFileAnswer.Succeeded checkFileResults -> Assert.Equal(0, checkFileResults.Diagnostics.Length)
1037-
1037+
10381038
// Update b.fsx, it should now load c.fsx
10391039
fileSystemShim.UpdateB()
10401040

@@ -1081,7 +1081,7 @@ let ``Parsing with cache and without project snapshot`` () =
10811081
async {
10821082
let checker = FSharpChecker.Create(useTransparentCompiler = true)
10831083
let fileName = "B.fs"
1084-
let parsingOptions = { FSharpParsingOptions.Default with SourceFiles = [| "A.fs"; fileName; "C.fs" |] }
1084+
let parsingOptions = { FSharpParsingOptions.Default with SourceFiles = [| "A.fs"; fileName; "C.fs" |] }
10851085
let sourceText =
10861086
SourceText.ofString """
10871087
module B
@@ -1091,7 +1091,7 @@ let b : int = ExtraIdentUserNeverWroteRulezzz
10911091
let! parseResult = checker.ParseFile(fileName, sourceText, parsingOptions, cache = true)
10921092
Assert.False(parseResult.ParseHadErrors)
10931093
Assert.True(Array.isEmpty parseResult.Diagnostics)
1094-
1094+
10951095
let! parseAgainResult = checker.ParseFile(fileName, sourceText, parsingOptions, cache = true)
10961096
Assert.False(parseAgainResult.ParseHadErrors)
10971097
Assert.True(Array.isEmpty parseAgainResult.Diagnostics)

0 commit comments

Comments
 (0)