From b2ca42640249dc302577090b6a829c9910f2f067 Mon Sep 17 00:00:00 2001 From: Octogonapus Date: Fri, 9 Aug 2024 15:31:49 -0400 Subject: [PATCH] fix --- test/interrupt_connection.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/interrupt_connection.jl b/test/interrupt_connection.jl index d6c9e5c..5f51971 100644 --- a/test/interrupt_connection.jl +++ b/test/interrupt_connection.jl @@ -17,12 +17,12 @@ client_id1; will = Will(topic1, AWS_MQTT_QOS_AT_LEAST_ONCE, "The client has gone offline!", false), on_connection_interrupted = (conn, error_code) -> begin - @warn "connection interrupted" error_code Threads.atomic_add!(interruptions, 1) + @warn "connection interrupted" error_code end, on_connection_resumed = (conn, return_code, session_present) -> begin - @info "connection resumed" return_code session_present Threads.atomic_add!(resumes, 1) + @info "connection resumed" return_code session_present end, ) @test fetch(task) == Dict(:session_present => false) @@ -30,7 +30,7 @@ # kill the MQTT connection run(`sudo ss -K dport = 8883`) - wait_for(() -> resumes[] > 0) + wait_for(() -> resumes[] > 0, Timer(30)) @test interruptions[] == 1 @test resumes[] == 1