fix: handle outdated message in channel queue#184
Conversation
🦋 Changeset detectedLatest commit: 44881df The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
What's the issue here? Can you provide more information? Reproduction or failing test for example. |
|
Hi, sorry, it was meant to be a draft PR ;) I've linked in the description to the issue this PR means to fix. |
|
Hi, @JounQin, what do you think of this PR? Would you be interested in such a contribution? |
|
Hi @JounQin, could you please take a look at this PR? |
|
Interesting, is that possible to add a related test case? |
Hi @JounQin , I've added a test case that will currently fail on
|
b66f1a5 to
e1dd83b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #184 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 204 218 +14
Branches 101 105 +4
=========================================
+ Hits 204 218 +14 ☔ View full report in Codecov by Sentry. |
|
Could all lines except |
I've been trying to achieve that. AFAIK these are the only other lines not covered: if (id < expectedId) {
const waitingTime = Date.now() - start
return receiveMessageWithId(
port,
expectedId,
waitingTimeout ? waitingTimeout - waitingTime : undefined,
)
}Adding coverage for them in a stable manner would require us to mock |
|
Good news @JounQin, I've managed add tests for those lines 😄 Could you take a look? |
|
Hi @JounQin, could you also add |
|
Thanks for your contribution! |
This reverts commit 30d28ae.
This reverts commit bf269b2.



Fixes #183