Skip to content

Export remotecall_eval #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/src/_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This documents notable changes in DistributedNext.jl. The format is based on
- [`other_workers()`](@ref) and [`other_procs()`](@ref) were implemented and
exported ([#18]).

### Changed
- [`remotecall_eval`](@ref) is now exported ([#23]).

## [v1.0.0] - 2024-12-02

### Fixed
Expand Down
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DistributedNext.fetch(::RemoteChannel)
DistributedNext.remotecall(::Any, ::Integer, ::Any...)
DistributedNext.remotecall_wait(::Any, ::Integer, ::Any...)
DistributedNext.remotecall_fetch(::Any, ::Integer, ::Any...)
DistributedNext.remotecall_eval
DistributedNext.remote_do(::Any, ::Integer, ::Any...)
DistributedNext.put!(::RemoteChannel, ::Any...)
DistributedNext.put!(::DistributedNext.Future, ::Any)
Expand Down
1 change: 1 addition & 0 deletions src/DistributedNext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export
other_procs,
remote,
remotecall,
remotecall_eval,
remotecall_fetch,
remotecall_wait,
remote_do,
Expand Down
17 changes: 11 additions & 6 deletions test/sshmanager.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test
using DistributedNext
import Sockets: getipaddr
import Sockets: getipaddr, listenany

import LibSSH as ssh
import LibSSH.Demo: DemoServer
Expand All @@ -26,8 +26,11 @@ function test_n_remove_pids(new_pids)
end

@testset "SSHManager" begin
DemoServer(2222; auth_methods=[ssh.AuthMethod_None], allow_auth_none=true, verbose=false, timeout=3600) do
sshflags = `-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -p 2222 `
ssh_port, server = listenany(2222)
close(server)

DemoServer(Int(ssh_port); auth_methods=[ssh.AuthMethod_None], allow_auth_none=true, verbose=false, timeout=3600) do
sshflags = `-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -p $(ssh_port)`
#Issue #9951
hosts=[]
localhost_aliases = ["localhost", string(getipaddr()), "127.0.0.1"]
Expand Down Expand Up @@ -66,7 +69,7 @@ end
print("\nssh addprocs with tunnel (SSH multiplexing)\n")
new_pids = addprocs_with_testenv([("localhost", num_workers)]; tunnel=true, multiplex=true, sshflags=sshflags)
@test length(new_pids) == num_workers
controlpath = joinpath(ssh_dir, "julia-$(ENV["USER"])@localhost:2222")
controlpath = joinpath(ssh_dir, "julia-$(ENV["USER"])@localhost:$(ssh_port)")
@test issocket(controlpath)
test_n_remove_pids(new_pids)
@test :ok == timedwait(()->!issocket(controlpath), 10.0; pollint=0.5)
Expand All @@ -82,9 +85,11 @@ end
h1 = "localhost"
user = ENV["USER"]
h2 = "$user@$h1"
h3 = "$h2:2222"
h3 = "$h2:$(ssh_port)"
h4 = "$h3 $(string(getipaddr()))"
h5 = "$h4:9300"
(bind_port, server) = listenany(9300)
close(server)
h5 = "$h4:$(bind_port)"

new_pids = addprocs_with_testenv([h1, h2, h3, h4, h5]; sshflags=sshflags)
@test length(new_pids) == 5
Expand Down
Loading