Skip to content

Commit 43178ee

Browse files
committed
tests: Robustify mutation test
1 parent 0b108ee commit 43178ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/mutation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ end
4141

4242
@testset "@mutable" begin
4343
w = first(workers())
44+
@assert w != 1 "Not enough workers to test mutability"
4445
x = remotecall_fetch(w) do
4546
Dagger.@mutable Ref{Int}()
4647
end
4748
@test fetch(Dagger.@spawn (x->x[] = myid())(x)) == w
48-
@test_throws_unwrap Dagger.ThunkFailedException fetch(Dagger.@spawn single=last(workers()) (x->x[] = myid())(x))
49+
@test_throws_unwrap Dagger.ThunkFailedException fetch(Dagger.@spawn single=1 (x->x[] = myid())(x))
4950
end # @testset "@mutable"
5051

5152
@testset "Shard" begin

0 commit comments

Comments
 (0)