Skip to content

Commit 63ef16d

Browse files
authored
Add another test
1 parent b3ec9a0 commit 63ef16d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/script.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ end
3333

3434
# We intentionally do not use `@assert` here.
3535
# In a future minor release of Julia, `@assert`s may be disabled by default.
36-
const SLURM_NTASKS = parse(Int, ENV["SLURM_NTASKS"])
36+
const SLURM_NTASKS = parse(Int, strip(ENV["SLURM_NTASKS"]))
3737
if nworkers() != SLURM_NTASKS
3838
msg = "Test failed: nworkers=$(nworkers()) does not match SLURM_NTASKS=$(SLURM_NTASKS)"
3939
error(msg)
4040
end
41+
if length(workers()) != SLURM_NTASKS
42+
msg = "Test failed: length(workers())=$(length(workers())) does not match SLURM_NTASKS=$(SLURM_NTASKS)"
43+
error(msg)
44+
end
4145

4246
const hosts = map(workers()) do id
4347
remotecall_fetch(() -> gethostname(), id)

0 commit comments

Comments
 (0)