Skip to content
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

NOISSUE - Update pubsub tests for rabbitmq #1656

Merged
merged 25 commits into from
Dec 31, 2022

Conversation

AryanGodara
Copy link
Contributor

@AryanGodara AryanGodara commented Sep 18, 2022

Signed-off-by: aryan aryangodara03@gmail.com

What does this do?

Adds tests for the nats implementation of pkg/messaging. nats part is left out for now.

Which issue(s) does this PR fix/relate to?

N/A

List any changes that modify/break current functionality

Nil

Have you included tests for your changes?

Yes

Did you document any new/modified functionality?

N/A

Notes

N/A

Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2022

Codecov Report

Merging #1656 (c3a3f48) into master (6f2ce82) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1656      +/-   ##
==========================================
- Coverage   70.29%   70.28%   -0.02%     
==========================================
  Files         148      148              
  Lines       11508    11509       +1     
==========================================
- Hits         8090     8089       -1     
- Misses       2754     2755       +1     
- Partials      664      665       +1     
Impacted Files Coverage Δ
pkg/messaging/mqtt/pubsub.go 73.63% <ø> (ø)
pkg/messaging/nats/pubsub.go 72.36% <ø> (ø)
pkg/messaging/rabbitmq/pubsub.go 68.67% <ø> (-2.41%) ⬇️
pkg/messaging/rabbitmq/publisher.go 68.18% <100.00%> (+0.73%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: aryan <aryangodara03@gmail.com>
@AryanGodara AryanGodara marked this pull request as ready for review September 18, 2022 19:20
@AryanGodara AryanGodara requested a review from a team as a code owner September 18, 2022 19:20
@AryanGodara AryanGodara force-pushed the update-pubsub-tests branch 2 times, most recently from 84473e7 to 840898c Compare September 18, 2022 20:13
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
pkg/messaging/rabbitmq/setup_test.go Outdated Show resolved Hide resolved
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
pkg/messaging/rabbitmq/pubsub.go Outdated Show resolved Hide resolved
Signed-off-by: aryan <aryangodara03@gmail.com>
drasko
drasko previously approved these changes Dec 15, 2022
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For NATS PubSub, we should probably also test cases with queue value other than "" because Subscriber in that case acts differently (L53 of setup_test.go).

pkg/messaging/nats/pubsub_test.go Outdated Show resolved Hide resolved
pkg/messaging/nats/pubsub.go Outdated Show resolved Hide resolved
pkg/messaging/nats/pubsub.go Outdated Show resolved Hide resolved
pkg/messaging/rabbitmq/pubsub_test.go Outdated Show resolved Hide resolved
pkg/messaging/nats/setup_test.go Outdated Show resolved Hide resolved
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
@AryanGodara AryanGodara changed the title NOISSUE - Update pubsub tests for nats and rabbitmq NOISSUE - Update pubsub tests for rabbitmq Dec 30, 2022
Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drasko drasko merged commit 302d71e into absmach:master Dec 31, 2022
@AryanGodara AryanGodara deleted the update-pubsub-tests branch January 4, 2023 05:16
rodneyosodo pushed a commit to rodneyosodo/magistrala that referenced this pull request Feb 2, 2023
* testPubSub failing on channel

Signed-off-by: aryan <aryangodara03@gmail.com>

* testPubSub failing, rest passing

Signed-off-by: aryan <aryangodara03@gmail.com>

* all tests passing

Signed-off-by: aryan <aryangodara03@gmail.com>

* removed unnecessary lines

Signed-off-by: aryan <aryangodara03@gmail.com>

* rename subunsub to unsubscribe

Signed-off-by: aryan <aryangodara03@gmail.com>

* nats tests working, rabbitmq left

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix TestPublisher

Signed-off-by: aryan <aryangodara03@gmail.com>

* changed clientID of pubsub

Signed-off-by: aryan <aryangodara03@gmail.com>

* testSubscribe failing, rest all passing

Signed-off-by: aryan <aryangodara03@gmail.com>

* testPubsub failing

Signed-off-by: aryan <aryangodara03@gmail.com>

* TestSubscribe(s) failing, rest tests passing.

Signed-off-by: aryan <aryangodara03@gmail.com>

* For Rabbitmq, all tests are passing.

Signed-off-by: aryan <aryangodara03@gmail.com>

* For Nats, All tests passing, but unreliable

Signed-off-by: aryan <aryangodara03@gmail.com>

* Fix typos and improve variable names.

Signed-off-by: aryan <aryangodara03@gmail.com>

* nats tests passing, rabbitmq half tests passing.

Signed-off-by: aryan <aryangodara03@gmail.com>

* all tests working.

Signed-off-by: aryan <aryangodara03@gmail.com>

* removed commented out, dead code.

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix errors, queuesubscribe tests for nats.

Signed-off-by: aryan <aryangodara03@gmail.com>

* updated broker.Connect to opts.Connect for nats.

Signed-off-by: aryan <aryangodara03@gmail.com>

* experimental soluton

Signed-off-by: aryan <aryangodara03@gmail.com>

* Revert nats back to original status.

Signed-off-by: aryan <aryangodara03@gmail.com>

* Remove unnecessary commit

Signed-off-by: aryan <aryangodara03@gmail.com>

Signed-off-by: aryan <aryangodara03@gmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants