vert-x3 / vertx-amqp-client

An AMQP client for Vert.x
Apache License 2.0
17 stars 18 forks source link

test improvements #45

Closed gemmellr closed 4 years ago

gemmellr commented 4 years ago

Many of the tests use a full broker, e.g sending and receiving messages through the broker in attempt to verify some sender or receiver behaviour. Some of the tests on the other hand make use of a vertx-proton based server tailored to the specific behaviour under test. The latter approach tends to make for better tests, as they can more specifically and fully verify the client behaviour than is possible by observing either side of a broker intermediary. As a bonus they also tend to be faster as result of being simpler and having less moving parts.

This PR converts a few of the test classes (as a starting point, many more can be done) to use a vertx-proton based test server rather than a broker, maintaining the existing verifications and occasionally adding more (e.g verifying proper acknowledgement of received messages, the expected type of disposition was sent etc)

cescoffier commented 4 years ago

@gemmellr do you think we should backport it to 3.9 too?

gemmellr commented 4 years ago

Probably yes, since its better/faster and will ease other backports to keep things closer. I didnt look into doing that yet though but I will.

gemmellr commented 4 years ago

Cherry picked to 3.9 in https://github.com/vert-x3/vertx-amqp-client/commit/cf66a30faf10dfeb3703133a6e56b095503e673c

cescoffier commented 4 years ago

Thanks @gemmellr