New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ringbuffer exchange exchange_client UT #767
Conversation
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
directly Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #767 +/- ##
==========================================
+ Coverage 64.51% 65.78% +1.26%
==========================================
Files 124 124
Lines 35999 35975 -24
==========================================
+ Hits 23226 23666 +440
+ Misses 12773 12309 -464 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not nng/kernel style
but still working fine
@@ -99,6 +99,7 @@ exchange_node_send_messages_dequeue(exchange_node_t *ex_node, int **key, nni_msg | |||
*aio = send_msg->aio; | |||
nni_list_remove(&ex_node->send_messages, send_msg); | |||
ex_node->send_messages_num--; | |||
nng_free(send_msg, sizeof(*send_msg)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better use lmq here.
put aio in msg->protodata
@@ -223,6 +223,12 @@ int ringBuffer_enqueue(ringBuffer_t *rb, | |||
} | |||
|
|||
if (rb->size == rb->cap) { | |||
/* ringbuffer not allowed to overwrite */ | |||
if (rb->overWrite == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.