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

live-stream needs timeout #40

Open
juliangruber opened this issue Nov 25, 2013 · 1 comment
Open

live-stream needs timeout #40

juliangruber opened this issue Nov 25, 2013 · 1 comment

Comments

@juliangruber
Copy link
Owner

Without https://github.com/juliangruber/multilevel/blob/master/test/live-stream.js#L29 the tests go crazy, with it we're making sure the live-stream is only created after all data has been written and the db connection is up.

I'm not sure if this is a bug with level-live-stream or multilevel or one of it's deps, but it's worth investigating.

@dominictarr
Copy link
Collaborator

looks like it's a race condition, on one level instance, if you do createLiveStream and then put the puts will be in the live-stream, even if created in the same tick.

if the rpc message does not get there within the tick, then it might have a problem.
normally I like to make stream tests work synchronously, so that it's possible to be exact about the timing.

I suspect this is about that, although this seems like it should work...

to test, you could wrap the (server) level in loggers so you can see the exact order that the createLiveStream and put are being called.

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

No branches or pull requests

2 participants