Closed NHDaly closed 9 months ago
I'm seeing
Test threw exception
Expression: close(server)
UndefVarError: current_exceptions not defined
Stacktrace:
[1] current_exceptions_to_string()
@ HTTP.Exceptions ~/work/HTTP.jl/HTTP.jl/src/Exceptions.jl:103
[2] shutdown(fn::Main.test_server.var"#shutdown_throw#24")
@ HTTP.Servers ~/work/HTTP.jl/HTTP.jl/src/Servers.jl:196
[3] foreach(f::typeof(HTTP.Servers.shutdown), itr::Vector{Function})
@ Base ./abstractarray.jl:2141
in the 1.6 tests
Aha, yeah, thanks! 👍
Some tests are not being run... is that intentional?
I couldn't see an issue about it so i opened one: https://github.com/JuliaWeb/HTTP.jl/issues/1093
Some tests are not being run... is that intentional?
I couldn't see an issue about it so i opened one: #1093
Yes, intentional. Thanks for opening the issue as I forgot about it. The downloads tests were relying on a public server that is no longer serving requests in the same way, so they were just constantly failing, so they were disabled. I pinged @oxinabox about it, but I think it's kind of a pain to dig into and figure out what to do instead.
Looks like Autobahn Server tests are failing (it seems these tests only run on linux)
Server: Test Failed at /home/runner/work/HTTP.jl/HTTP.jl/test/websockets/autobahn.jl:90
Expression: v["behavior"] in ("OK", "NON-STRICT", "INFORMATIONAL", "UNIMPLEMENTED")
Evaluated: "FAILED" in ("OK", "NON-STRICT", "INFORMATIONAL", "UNIMPLEMENTED")
Stacktrace:
[1] macro expansion
@ /opt/hostedtoolcache/julia/1.9.3/x64/share/julia/stdlib/v1.9/Test/src/Test.jl:478 [inlined]
[2] macro expansion
@ ~/work/HTTP.jl/HTTP.jl/test/websockets/autobahn.jl:90 [inlined]
[3] macro expansion
@ /opt/hostedtoolcache/julia/1.9.3/x64/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
[4] macro expansion
@ ~/work/HTTP.jl/HTTP.jl/test/websockets/autobahn.jl:80 [inlined]
[5] macro expansion
@ /opt/hostedtoolcache/julia/1.9.3/x64/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
[6] top-level scope
@ ~/work/HTTP.jl/HTTP.jl/test/websockets/autobahn.jl:22
Slightly related to this PR, there is a bad call to current_exceptions_to_string
at https://github.com/JuliaWeb/HTTP.jl/blob/45b6d92edd73ab5cc9885d6c5ca611fb9233aceb/src/clientlayers/ConnectionRequest.jl#L134
Slightly related to this PR, there is a bad call to
current_exceptions_to_string
at
Thanks, i've fixed that. ... So we're missing code coverage on that error path, yeah?
Merging #1092 (c1b4230) into master (bda4ef2) will increase coverage by
0.14%
. The diff coverage is57.14%
.
@@ Coverage Diff @@
## master #1092 +/- ##
==========================================
+ Coverage 82.49% 82.63% +0.14%
==========================================
Files 32 32
Lines 3044 3052 +8
==========================================
+ Hits 2511 2522 +11
+ Misses 533 530 -3
Files Changed | Coverage Δ | |
---|---|---|
src/Streams.jl | 96.21% <ø> (ø) |
|
src/clientlayers/ConnectionRequest.jl | 77.31% <0.00%> (ø) |
|
src/clientlayers/StreamRequest.jl | 95.78% <0.00%> (ø) |
|
src/clientlayers/TimeoutRequest.jl | 86.66% <0.00%> (ø) |
|
src/Exceptions.jl | 66.66% <75.00%> (+19.99%) |
:arrow_up: |
src/Servers.jl | 80.20% <90.00%> (-0.01%) |
:arrow_down: |
src/Connections.jl | 85.18% <100.00%> (+0.31%) |
:arrow_up: |
src/WebSockets.jl | 87.17% <100.00%> (-0.33%) |
:arrow_down: |
... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Thanks, i've fixed that. ... So we're missing code coverage on that error path, yeah?
Introducing codecov is the right answer:)
The remaining test failures are also flakes from tests that I introduced very recently https://github.com/JuliaWeb/HTTP.jl/pull/1110. There I test that internal exceptions are not retried by expecting the request to finish way sooner than the total retry delays, but now I think I didn't choose good value for that (max waiting time of 3 seconds was perhaps too ambitious). Sorry for that! I think if we bump the total delay and max waiting time by 10x, it should be less flakey.
Signoff from @Drvi on slack that we can ignore the Invalidations job failure for now. Thanks!
This is a follow-up from https://github.com/JuliaWeb/HTTP.jl/pull/1065, fixing a few more cases of the old logging style.
Also adds a test that at least one of those logs does indeed log the exception details in the string, so we know the exception logging is working as expected.
Finally, cleans up a couple unused variables in
catch e
in 2 places, and updatesBase.catch_stack()
toBase. current_exceptions()
, which is the new, public API for this which is exported from Base. It starts warning about calling the older, deprecated function in 1.9.