Skip to content

Test: Child tasks have identical RNG streams after a testset in 1.10.0-beta2 #51255

@nhz2

Description

@nhz2
          So that might be an issue with `Test.guardseed` now then. That `copy` seems to be supposed to work.

Originally posted by @vtjnash in #51225 (comment)

Here is a MWE that works in 1.9 but fails in 1.10.

using Test

@testset "top test" begin
    random_nums = Float64[]
    for i in 1:5
        @testset "inner test" begin
            @test true
        end
        push!(random_nums, fetch(@async(rand())))
    end
    @test !allequal(random_nums)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    randomnessRandom number generation and the Random stdlibregressionRegression in behavior compared to a previous versiontestsystemThe unit testing framework and Test stdlib

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions