Commit Graph

208 Commits

Author SHA1 Message Date
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 0bc1c32bd8 add test for sharing a channel
Though it's not necessarily recommended (per spec), Channels can be
shared by multiple Exchanges and Queues. I've added a test here showing
that's possible with QAMQP
2014-08-08 17:09:52 -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 81cdb98c86 add script for generating test coverage with gcov/lcov
These lines are taken directly from the gcov.prf qmake feature file
2014-08-07 14:18:27 -04:00
Matt Broadstone 695f7d2997 complete close handshakes properly for Client and Channel
We had frame handlers for Close messages from the server, but were not
doing our due diligence and sending a corresponding CloseOk back to the
server after processing. It seems RabbitMQ is generous in this case, but
at least we're doing it the right way now
2014-08-07 14:12:28 -04:00
Matt Broadstone 1ebe3bd667 implement flow frame handling support
Fleshed out the previously unimplemented flow control frame handling,
added an auto test for it. Also refactored out the stateChanged ChannelPrivate
method, if we need proper state support in the future it will be added with
a better implementation
2014-08-07 13:52:09 -04:00
Matt Broadstone fb93bd8096 update build status tag to qamqp, from qamqp-ng 2014-08-06 22:38:36 -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 bb2e9881ea short strings are latin1 encoded not utf8 2014-08-05 15:45:25 -04:00
Matt Broadstone 3ce39c273f use compatible type max definitions
UINT8_MAX/UINT16_MAX only work on osx and glibc builds with certain
defines.
2014-08-05 15:28:19 -04:00
Matt Broadstone fdb8dddc14 initialize network variables
there were a number of variables copied over from the legacy Network
class that were not properly initialized.
2014-08-05 14:38:13 -04:00
Matt Broadstone 88e0d0827a add autotest for message properties
enhance test coverage around message properties, allowing for better
refactoring of the properties in general.
2014-08-05 14:34:12 -04:00
Matt Broadstone d5cc6258c6 refactor type handling in QAMQP
There are two distinctive type sets in AMQP, the basic AMQP types
and then the superset of Table value types. This commit attempts to
make that distinction more clear by the addition of a Table class.
Basically, AMQP value type read/write support is left in Frame for the
time being, while table value field read/write support has been moved
to the Table class. Also, a number of type differences exist between
the spec and rabbitmq's binary parser (noted in the errata page) which
were not previously honored.
2014-08-05 14:34:12 -04:00
Matt Broadstone 4ea3bdb851 don't store content message in Content frame
the message was being needlessly duplicated into the Content frame,
now we only store the size there to be sent out, rather than the whole
message

remove QAMQP prefix in authenticator
2014-08-05 14:34:03 -04:00
Matt Broadstone d9d2a677b9 remove queue in delayedBind
since the queue is not set to be consumed, it doesn't automatically
clean up.
2014-07-29 13:51:07 -04:00
Matt Broadstone a2c6af748b improve Client test coverage 2014-07-29 13:45:53 -04:00
Matt Broadstone 77134f0279 frame cleanup
removed crufty code, improve test coverage
2014-07-29 13:35:01 -04:00
Matt Broadstone a75307ae9f check standard message headers
improve code coverage by checking a few standard message headers
during queue autotests
2014-07-29 13:26:18 -04:00
Matt Broadstone fe7f9f09ef verify queue options
improve test coverage by validating queue options on declaration
2014-07-29 13:02:24 -04:00
Matt Broadstone 1083f4db3a test delayed queue bindings
improve code coverage by adding a test for delayed declaration and
bindings of queues. also uncovered a bug with disconnectFromHost in
Client
2014-07-29 12:57:15 -04:00
Matt Broadstone 254a0fbf54 test binding to Exchange objects
improve test coverage for binding using objects rather than strings
2014-07-29 12:47:26 -04:00
Matt Broadstone 75f7882d1c update flakey get test 2014-07-28 17:55:30 -04:00
Matt Broadstone a8feef7d82 update build badge
qamqp-ng => qamqp
2014-07-28 15:25:31 -04:00
Matt Broadstone 4a0fa8bf9c fix flakey qos test
the qos autotest required initially for us to wait for messages to
be added to the queue before running the test, and this was flakey
at best. these changes make it much more dependable
2014-07-28 12:58:37 -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 5d00b2a068 add accessors for custom headers
Moved from direct access to a Frame::TableField to accesors to that
data. More readable/useable api for this data.
2014-07-21 17:08:13 -04:00
Matt Broadstone 5c6cd23e10 move property definition/access to Message
MessageProperties is currently defined in Frame::Content, which makes it
cumbersome to use when working directly with a Message itself. I attempted
to make this easier by using typedefs, but it's become pretty obvious that
it belongs in the Message class itself.
2014-07-21 16:54:12 -04:00
Matt Broadstone dec9ef72d3 added test for invalid routing keys
also added a debug message for attempts to write shortstr's greater
than acceptable length.
2014-06-30 18:42:39 -04:00
Matt Broadstone a89dbb3805 add tests for proper uri validation
this is the missing component from PR #41, tests a number of example
amqp uri's provided by the RabbitMQ spec/documentation
2014-06-26 16:05:47 -04:00
Matt Broadstone 12a03f959f add qos support to channel
AMQP Basic qos support added to Channel class. There is an option
for global qos which is currently not added. Also, added auto tests
for qos definition, proper qos operation and verifying that RabbitMQ
does not support prefetchSize.
2014-06-26 10:28:58 -04:00
Matt Broadstone 9bd5610ac7 added auto test for issue #33 2014-06-25 21:18:22 -04:00
Matt Broadstone 92384ce7cb add an auto test for synchronous get 2014-06-25 20:54:50 -04:00
Matt Broadstone 824d8d56ca add PR #41
vhosts can't start with a /
2014-06-24 21:35:58 -04:00
Matt Broadstone b662fd6557 fix issue #33
AMQP_BASIC_CONTENT_ENCODING_FLAG and AMQP_BASIC_MESSAGE_ID_FLAG were
switched
2014-06-24 21:26:22 -04:00
Matt Broadstone 8879211c80 refactor queue auto tests
refactored queue declaration code to a single method
added a test for the synchronous Get AMQP api, emitting an empty signal
2014-06-24 21:10:54 -04:00
Matt Broadstone e94f372cfe clean up QAMQP::Queue api
removed noAck as it relates only to the synchronous get AMQP api
moved noAck to get method
applied visual separation in headers between AMQP Queue and AMQP Basic methods
2014-06-24 21:09:45 -04:00
Matt Broadstone fcc3d36bba remove manual tests
all of these original tests have been moved to the tutorials
2014-06-24 21:08:33 -04:00
Matt Broadstone cab23c97cc add support for cancelling a consumer
cancel method and cancelled signal added to Queue, added auto tests
to guarantee conditions surrounding the cancel process
2014-06-24 11:09:19 -04:00
Matt Broadstone c43c2d6788 ensure consuming only occurs once per queue
a Queue can act as a consumer in QAMQP, but previously we did no checks
to ensure that a Queue sent a request to consume only once. This commit
adds API for checking and ensuring that this is the case. Also, I reverted
the changes to allow multiple consumer tags because this was incorrect.
Also included is a new signal "consuming" to notify when consumption occurs,
and auto tests have been updated to use this, as well as verify that it
can only occur once per-consumer
2014-06-24 10:30:05 -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 cb52911bed additional peer exceptions added
added a few cases where we should be raising peer exceptions when
delivered invalid frames from the server (per spec)
2014-06-19 13:36:11 -04:00
Matt Broadstone 81f9437495 changed some variable names for clarity and readability 2014-06-19 11:04:20 -04:00
Matt Broadstone 27d8329065 added topics tutorial 2014-06-19 11:04:04 -04:00
Matt Broadstone b9a85b3051 added the routing tutorial 2014-06-19 10:50:40 -04:00
Matt Broadstone 1ae43ef4bd change the way messages are received
Messages used to be "delivered" and pushed right onto the queue, which
is where the requirement for Message to be explicitly shared came from.
Now messages that are incomplete come in and are stored in a "currentMessage"
private member (there is a requirement that messages are delivered in this
fashion, by the spec). Once the message body has come in, it is put into
the local queue and the messageReceived signal is emitted.

Also, modified Queue to be able to track a number of consumer tags. This
was exposed by the "routing" tutorial, where a single consumer can bind
to a number of exchanges with a generated consumer tag. The previous example
did not run into this problem because it used an explicitly set consumer tag
and therefore there were no conflicts.
2014-06-19 10:01:47 -04:00
Matt Broadstone bf21ebc246 refactor Message
message now provides an "isValid" property, data is implicitly shared now
2014-06-19 10:00:52 -04:00
Matt Broadstone 64c371ebb0 implemented pubsub tutorial 2014-06-18 14:21:42 -04:00