-
Notifications
You must be signed in to change notification settings - Fork 11
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
agent.addListener works intermitently? #172
Comments
@mixmix can u show me how are you doing the listening part in your tests? I wonder if you are really listening to 1 listener or multiple ones and whats going on. |
are u calling agent stop by any change after each test runs? |
No. This is in 4.0.2 i have just coded to give up on the listener after 60s, then search for the message via pluto.getAllMessages, match on piuri + thid and it' ALWAYS there 😅 |
Here's code. See HACK comment https://gitlab.com/ahau/lib/ssb-plugins/ssb-atala-prism/-/blob/master/index.js?ref_type=heads#L130 |
@mixmix , could you tell if this issue is still applicable as it's been more than a month without an update. cc @elribonazo |
I need to go back and undo the hack I have in place to guard against this in our code |
Is this a regression?
Yes
Description
Listening with
agent.addListener('message', cb)
forthid + piuri
:Arrived:
But what's this....messages found with
agent.pluto.getAllMessages
:Match is seen as 3rd entry in Array
Please provide the exception or error you saw
Not an exception, was just expecting an new matching "Messsage" to trigger.
Interestingly I see this one test working in a particular test, but when I run a suite of tests (in series) what I see is this test failing (it runs after another test... but the location of the tests paths should be different and the runs should be clean...)
Please provide the environment you discovered this bug in
No response
Anything else?
Here's what it looks like with events when this test is run in isolation:
Listening with
agent.addListener('message', db)
forthid + piuri
:Arrived:
Yay! it arrived here
The text was updated successfully, but these errors were encountered: