Skip to content
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

fix(ci): fix test code that caused ci freeze #69

Merged
merged 1 commit into from
Mar 15, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function test(uri)
# a closed channel is equivalent of cancellation of the call,
# no error should be thrown, but response can be nothing if call was interrupted immediately
@test !isopen(response_channel)

# open a new channel to use
response_channel = Channel{Order}(1)
try
resp, http_resp = get_order_by_id(api, response_channel, Int64(5))
@test (200 <= http_resp.status <= 206)
Expand Down
3 changes: 3 additions & 0 deletions test/client/petstore_v2/petstore_test_storeapi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function test(uri)
# a closed channel is equivalent of cancellation of the call,
# no error should be thrown, but response can be nothing if call was interrupted immediately
@test !isopen(response_channel)

# open a new channel to use
response_channel = Channel{Order}(1)
try
resp, http_resp = get_order_by_id(api, response_channel, Int64(5))
@test (200 <= http_resp.status <= 206)
Expand Down
3 changes: 3 additions & 0 deletions test/client/petstore_v3/petstore_test_storeapi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function test(uri)
# a closed channel is equivalent of cancellation of the call,
# no error should be thrown, but response can be nothing if call was interrupted immediately
@test !isopen(response_channel)

# open a new channel to use
response_channel = Channel{Order}(1)
try
resp, http_resp = get_order_by_id(api, response_channel, Int64(5))
@test (200 <= http_resp.status <= 206)
Expand Down
4 changes: 2 additions & 2 deletions test/client/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ function runtests(; skip_petstore=false, test_file_upload=false)
PetStoreV3Tests.runtests(; test_file_upload=test_file_upload)
end
@testset "V2" begin
@info("Running petstore v2 tests")
PetStoreV2Tests.runtests()
@info("Running petstore v2 tests")
PetStoreV2Tests.runtests()
end
else
@info("Skipping petstore tests in non Linux environment (can not run petstore docker on OSX or Windows)")
Expand Down
Loading