From 3306c1daaf117e25df6570b5941cfef2aafee623 Mon Sep 17 00:00:00 2001 From: Jakub Wronowski Date: Wed, 4 Oct 2023 12:21:05 +0200 Subject: [PATCH] revert tests --- test/connection.jl | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/connection.jl b/test/connection.jl index 959338cb..f9147ca6 100644 --- a/test/connection.jl +++ b/test/connection.jl @@ -16,28 +16,28 @@ end @testset "Method error hints." begin nc = NATS.connect() - hint = """To use `Type{Float64}` as parameter of subscription handler apropriate conversion from `Type{NATS.Msg}` must be provided. - ``` - import Base: convert + # hint = """To use `Type{Float64}` as parameter of subscription handler apropriate conversion from `Type{NATS.Msg}` must be provided. + # ``` + # import Base: convert - function convert(::Type{Type{Float64}}, msg::Union{NATS.Msg, NATS.HMsg}) - # Implement conversion logic here. - end - """ - @test_throws hint subscribe("SOME.THING") do msg::Float64 + # function convert(::Type{Type{Float64}}, msg::Union{NATS.Msg, NATS.HMsg}) + # # Implement conversion logic here. + # end + # """ + @test_throws MethodError subscribe("SOME.THING") do msg::Float64 put!(c, msg) end @test_throws MethodError request("SOME.REQUESTS"; payload = 4) - hint = """Object of type `Int64` cannot be serialized into payload.""" - @test_throws hint request("SOME.REQUESTS", 4) # TODO: in this case there should be rather warning about missing payload. - hint = """To use `Type{Integer}` as parameter of subscription handler apropriate conversion from `Type{NATS.Msg}` must be provided. - ``` - import Base: convert + # hint = """Object of type `Int64` cannot be serialized into payload.""" + @test_throws MethodError request("SOME.REQUESTS", 4) # TODO: in this case there should be rather warning about missing payload. + # hint = """To use `Type{Integer}` as parameter of subscription handler apropriate conversion from `Type{NATS.Msg}` must be provided. + # ``` + # import Base: convert - function convert(::Type{Type{Integer}}, msg::Union{NATS.Msg, NATS.HMsg}) - # Implement conversion logic here. - end - """ + # function convert(::Type{Type{Integer}}, msg::Union{NATS.Msg, NATS.HMsg}) + # # Implement conversion logic here. + # end + # """ @test_throws MethodError reply("SOME.REQUESTS") do msg::Integer "Received $msg" end