Commit Graph

25 Commits

Author SHA1 Message Date
Stuart Longland cd655d3f1d QAmqpExchange redeclaration test: Re-open a closed channel.
If the server closes the channel on us, re-open it before removing the
exchange.
2015-05-02 20:44:17 +10:00
Stuart Longland f79e96fae8 QAmqpExchange tests: Wait for destroyed signal.
Maybe my laptop is too quick, but it seems the exchange hangs around a
little too long for this test to pass.
2015-04-14 09:10:07 +10:00
Matt Broadstone a4bc1b5f4e show example of queued calls on QAmqpExchange
This gives an example of how you can use QMetaObject::invokeMethod to
call a QAmqpExchange from another thread. Also, moved the qRegisterMetaType
for QAmqpMessage::PropertyHash to the ctor of QAmqpClientPrivate
2015-02-27 09:13:17 -05:00
Matt Broadstone 4640a9ad6a cleanup frame handlers on channel deletion
In cases where exchanges and queues are added and deleted during
an extended use of a QAmqpClient, the client should internally cleanup
the frame handlers registered for those objects. This patch does that
as well as providing two test cases verifying this behavior for both
QAmqpQueue and QAmqpExchange.
2015-02-06 16:12:58 -05:00
Matt Broadstone f5736a9615 rename UnroutableKey to NoRouteError 2015-02-04 19:59:57 -05:00
Matt Broadstone 8cc8d5e641 add test for invalid passive exchange declarations
Verify the behavior of signaling an error if a passive exchange is
declared, but not found on the server.
2015-02-04 16:41:42 -05:00
Matt Broadstone f2ac01de34 add preliminary support for publisher acknowledgements
RabbitMQ supports publish confirms (Publisher Acknowledgements) on
a given channel. This enables the user to toggle this functionality
and ensure that published messages are in fact published.
2015-01-19 13:51:20 -05:00
Matt Broadstone 10ab1423c2 remove QAMQP namespace
This is a very small library, so there is no real pressing need for
a library namespace. Further, the namespacing actually makes it rather
difficult to work with in some cases. Opting for a more "Qt" style
class naming scheme, using the QAmqp class prefix
2014-09-15 13:26:48 -04:00
Matt Broadstone 6a3d355de2 rename amqp_ files to qamqp
amqp_<filename> is used in at least two other C/C++ projects related
to amqp, so this commit changes all our source to use a qamqp header.
This avoids potential clashes, and is more in line with Qt style
2014-08-26 15:05:39 -04:00
Matt Broadstone 0ccb3035cd move QAMQP::Frame to private API
QAMQP::Frame used to be public API mostly for MessageProperties. There
is no longer a need to keep this API public, as it should all be wrapped
with the cleaner Message/Queue/Exchange/Client API set
2014-08-26 09:57:08 -04:00
Matt Broadstone 870af7b5d4 split channel tests into their own executable
Refactored tests specific to QAMQP::Channel into its own full test
case, as there are more on the way
2014-08-08 17:09:51 -04:00
Matt Broadstone baa5c1de3e refactor Channel::channelClose to just Channel::close 2014-08-08 17:09:51 -04:00
Matt Broadstone 6291bb7f42 add auto test for channel close
improve code coverage for tests by including a test for Channel::closeChannel
to both Exchange and Queue test suites
2014-08-06 22:35:46 -04:00
Matt Broadstone 9fbd0a852f add tests for non-delayed declaration
existing tests have been immediately declaring queues and exchanges, and
not testing non-delayed declaration (queue/exchange is OPEN when declaration
occurs). these new tests cover this case
2014-08-06 09:03:34 -04:00
Matt Broadstone fa132d7c72 guarantee frames are written
wait for the END frame to be written, guaranteeing that data will
be written when you think it has been.
2014-07-28 11:36:52 -04:00
Matt Broadstone 50e38c7455 add auto test for immediate publish option
as of RabbitMQ 3.x the immediate publishing bit is no longer supported,
added a test to ensure proper functionality.
2014-06-23 19:21:41 -04:00
Matt Broadstone 4f808bef92 add publish options
- add publish options to Exchange (these need to move to a Basic abstraction)
- listen for bmReturn in Exchange to catch errors
- added auto tests to check behavior of an invalid mandatory publish
- cleaned up bit fields in exchange and queue
2014-06-23 15:36:03 -04:00
Matt Broadstone 352669f392 added all tests around exchange declaration 2014-06-11 15:49:05 -04:00
Matt Broadstone 4a09094140 added autotest for invalid exchange declarations 2014-06-11 14:38:42 -04:00
Matt Broadstone 496e00abb9 move error constants to global namespace 2014-06-11 13:44:30 -04:00
Matt Broadstone e1522771e3 refactor exchange test to create a client and connect/disconnect after each test 2014-06-11 11:36:59 -04:00
Matt Broadstone c2dad7d6bb added RemoveOptions to Exchange, remove auto deletion (this should be handled by the AutoDelete option), and added
a test for an invalid remove(roIfUnused)
2014-06-10 21:41:28 -04:00
Matt Broadstone eaee35df12 add a test for a default exchange to tst_QAMQPQueue 2014-06-04 10:24:45 -04:00
Matt Broadstone fde4bcf39a overhauled tests, added TestCase class, made a few skeleton auto tests 2014-06-03 13:48:50 -04:00
Matt Broadstone 360e64b34b add auto tests for standard exchange types
fixed a bug with reporting the removal of an exchange
added an ExchangeType enum for standard types
2014-06-02 11:00:04 -04:00