File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ server_endpoint = isempty(ARGS) ? "http://localhost:10000/" : ARGS[1]
8888 @debug (" testing routeclinet..." )
8989 test_clients (server_endpoint)
9090
91+ @debug (" testing async safety..." )
92+ test_task_safety (server_endpoint)
93+
9194 kill (serverproc)
9295 @info (" stopped test server" )
9396end
Original file line number Diff line number Diff line change @@ -171,4 +171,22 @@ function test_clients(server_endpoint::String)
171171 test_blocking_client (server_endpoint)
172172 @info (" testing async client" )
173173 test_async_client (server_endpoint)
174+ end
175+
176+ function test_task_safety (server_endpoint:: String )
177+ @testset " async safety" begin
178+ client = RouteGuideBlockingClient (server_endpoint; verbose= false )
179+ @sync begin
180+ for taskid in 1 : 5
181+ @async begin
182+ test_get_feature (client)
183+ test_list_features (client)
184+ test_record_route (client)
185+ test_route_chat (client)
186+ test_exception ()
187+ test_message_length_limit (server_endpoint)
188+ end
189+ end
190+ end
191+ end
174192end
You can’t perform that action at this time.
0 commit comments