Skip to content

Commit a052874

Browse files
remove randomness from the test
1 parent 0ed23b0 commit a052874

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/downstream/ensemble.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ sim = solve(prob2,Tsit5(),trajectories=10000,batch_size=20)
8080
@test sim.converged == true
8181

8282

83-
Random.seed!(100)
83+
prob_func = function (prob,i,repeat)
84+
ODEProblem(prob.f,(1 + i/100)*prob.u0,prob.tspan,1.01)
85+
end
86+
8487
reduction = function (u,batch,I)
8588
u = append!(u,batch)
8689
u,false
@@ -90,7 +93,6 @@ prob2 = EnsembleProblem(prob,prob_func=prob_func,output_func=output_func,reducti
9093
sim = solve(prob2,Tsit5(),trajectories=100,batch_size=20)
9194
@test sim.converged == false
9295

93-
Random.seed!(100)
9496
reduction = function (u,batch,I)
9597
u+sum(batch),false
9698
end
@@ -105,4 +107,4 @@ output_func = function (sol,i)
105107
end
106108
prob2 = EnsembleProblem(prob,prob_func=prob_func,output_func=output_func)
107109
sim2 = solve(prob2,Tsit5(),trajectories=2)
108-
@test !sim2.converged && typeof(sim2.u) == Vector{SomeUserType}
110+
@test sim2.converged && typeof(sim2.u) == Vector{SomeUserType}

0 commit comments

Comments
 (0)