Skip to content

Commit

Permalink
test disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubwro committed Oct 6, 2023
1 parent 9df54b2 commit 05966e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/chaos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,10 @@ end
unsubscribe(sub)
@info "Published: $(published_count.value), received: $(received_count.value)."
end

@testset "Disconnecting when retries exhausted." begin
nc = NATS.connect(;default = false, reconnect_delays = [])
@test restart_nats_server() == 0
sleep(2)
@test nc.status == NATS.DISCONNECTED
end

0 comments on commit 05966e3

Please sign in to comment.