-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Make tests that after connected/clientReady event. #365
base: main
Are you sure you want to change the base?
Conversation
We assumed that client connection is ready when writing mqtt packets, we strengthen tests not to have race conditions.
I think this depends on what we decide to do with #362 |
@robertsLando Yes, it's inspired by #362 |
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.
I. would like to see some tests that verifies what happens when packets arrives before CONNACK is issued.
@mcollina I have added those tests in my PR. |
Is this still required even if we have decided to queue incoming packets? |
I think we should wait to land #362 |
@mcollina So what we do now with this now? Is it unecessary? |
This currently conflicts. I'm not opposed to this landing. |
@mcollina CI fixed |
Please hold a bit, I’m going to make a big change. This PR may be closed after that if my work is successful. |
@gnought 👍 |
@gnought Any news about this? |
@robertsLando will keep you posted.
|
The upcoming changes have been ready in my local working copy. The PR will be big, and simplify a lot. |
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
@robertsLando Here is an early access (https://github.com/gnought/aedes/commits/next) what my next PR will be after migrating #408, #416 and #418 into the main branch. |
@gnought Did you made any performance testing? |
How do you handle packets while client is connecting as you removed the queueLimit? I saw you have paused client in connect handle. |
About PROXY decoding, the hook should be added here: https://github.com/gnought/aedes/blob/next/lib/mqtt-stream-parser.js#L19 Like we were doing in nextBatch before. I also suggest to start adding some more comments to the code to make it more clear why we do some operations. Like I said for client pause, it could be difficult for new developers understand how the code works |
@robertsLando when we pause the stream, NodeJS will do buffering itself (https://nodejs.org/api/stream.html#stream_buffering), and we could still get those buffered data after resume. Constructing our own queue is a rewheel their work. We could do some comments on coding side after we polish it. :) |
@gnought Interesting :) didn't know about that, and how could we handle an overflow so? Could we set a limit someway? |
I answer to myself: Does we handle case when stream write returns |
I the |
@gnought What about your |
Will do. Let see if I can break it in a smaller pr. and how the PROXY architecture should be |
@ robertsLando What I understand is |
@gnought I don't understand, the link you pointed me doesn't seems to handle the overflow... We should handle it |
Pull Request Test Coverage Report for Build b7f7b1502cd22c78fe10692b561a683c6890122f-PR-365Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
We assumed that client connection is ready when writing mqtt packets, we strengthen tests not to have race conditions.