Skip to content

Commit

Permalink
Delete streams test case
Browse files Browse the repository at this point in the history
The test suite constructed a wrong filter-set.
Specifically the value of the filter-set didn't use a described type as
mandated by the spec.
Using https://azure.github.io/amqpnetlite/api/Amqp.Types.DescribedValue.html
throws errors that the descriptor can't be encoded. Given that this code
path is already tests via the amqp_filtex_SUITE, this F# test gets
therefore deleted.
  • Loading branch information
ansd committed Oct 2, 2024
1 parent 9a79b59 commit 64feb7a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
7 changes: 1 addition & 6 deletions deps/rabbit/test/amqp_system_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ groups() ->
auth_failure,
access_failure,
access_failure_not_allowed,
access_failure_send,
streams
access_failure_send
]},
{java, [], [
roundtrip
Expand Down Expand Up @@ -122,10 +121,6 @@ roundtrip(Config) ->
run(Config, [{dotnet, "roundtrip"},
{java, "RoundTripTest"}]).

streams(Config) ->
declare_queue(Config, ?FUNCTION_NAME, "stream"),
run(Config, [{dotnet, "streams"}]).

roundtrip_to_amqp_091(Config) ->
declare_queue(Config, ?FUNCTION_NAME, "classic"),
run(Config, [{dotnet, "roundtrip_to_amqp_091"}]).
Expand Down
42 changes: 0 additions & 42 deletions deps/rabbit/test/amqp_system_SUITE_data/fsharp-tests/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -179,45 +179,6 @@ module Test =
assertEqual rtd.Properties.CorrelationId corr
()

let streams uri =
use c = connectAnon uri
let name = "streams-test"
let address = "/queues/streams"
let sender = SenderLink(c.Session, name + "-sender" , address)
//for body in sampleTypes do
let body = "hi"B :> obj

let corr = "correlation"
new Message(body,
Properties = new Properties(CorrelationId = corr))
|> sender.Send
//TODO wait for settlement
let specs = [box("first");
box("last");
box("10m");
box(0)]
for spec in specs do
printfn "testing streams spec %A" spec
let filterSet = Map()
filterSet.Add(Symbol "rabbitmq:stream-offset-spec", spec)
let source = Source(Address = address,
FilterSet = filterSet)
let attach = Attach(Source = source)
let attached = new OnAttached (fun _ _ -> ())
let receiver = ReceiverLink(c.Session, Guid.NewGuid().ToString(), attach, attached)
receiver.SetCredit(100, true)
let rtd = receiver.Receive()
assertNotNull rtd
assertEqual 3 rtd.MessageAnnotations.Map.Count
assertTrue (rtd.MessageAnnotations.Map.ContainsKey(Symbol "x-stream-offset"))
assertTrue (rtd.MessageAnnotations.Map.ContainsKey(Symbol "x-exchange"))
assertTrue (rtd.MessageAnnotations.Map.ContainsKey(Symbol "x-routing-key"))

assertEqual body rtd.Body
assertEqual rtd.Properties.CorrelationId corr
receiver.Close()
()

open RabbitMQ.Client

let roundtrip_to_amqp_091 uri =
Expand Down Expand Up @@ -553,9 +514,6 @@ let main argv =
| [AsLower "invalid_routes"; uri] ->
invalidRoutes uri
0
| [AsLower "streams"; uri] ->
streams uri
0
| [AsLower "no_routes_is_released"; uri] ->
no_routes_is_released uri
0
Expand Down

0 comments on commit 64feb7a

Please sign in to comment.