Skip to content

flaky test in filewatching stdlib? #55670

@nsajko

Description

@nsajko

A test failed in a CI run on #55521 on the "test x86_64-linux-gnuassertrr" job:

FileWatching                                     (12) |         failed at 2024-09-02T08:35:51.858
Test Failed at /cache/build/tester-amdci4-9/julialang/julia-master/julia-a0fe172fb8/share/julia/stdlib/v1.12/FileWatching/test/pidfile.jl:239
  Expression: 8 < t < 20
   Evaluated: 8 < 47.819079585 < 20

Context within test suite:

@assert !ispath("pidfile")
@testset "open_exclusive: break lock" begin
@testset "using stale_age without lock refreshing" begin
t = @elapsed f = open_exclusive("pidfile", poll_interval=3, stale_age=10, refresh=0)::File
try
write_pidfile(f, getpid())
finally
close(f)
end
@test t < 2
t = @elapsed f = open_exclusive("pidfile", poll_interval=3, stale_age=1, refresh=0)::File
close(f)
@test 20 < t < 50
rm("pidfile")
end
@testset "using stale_age with lock refreshing on (default)" begin
t = @elapsed f = open_exclusive("pidfile", poll_interval=3, stale_age=10)::File
try
write_pidfile(f, getpid())
finally
close(f)
end
@test t < 2
t = @elapsed f = open_exclusive("pidfile", poll_interval=3, stale_age=5)::File
close(f)
@test 20 < t < 50
rm("pidfile")
end
t = @elapsed f = open_exclusive("pidfile", poll_interval=3, stale_age=10)::File
close(f)
@test t < 2
t = @elapsed f = open_exclusive("pidfile", poll_interval=3, stale_age=10)::File
close(f)
@test 8 < t < 20
rm("pidfile")
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIndicates similar issues or pull requestsstdlibJulia's standard librarytestThis change adds or pertains to unit tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions