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

ensured the log block finishes in test helper requests #245

Conversation

kybishop
Copy link
Contributor

Fixes #242

The log block is wrapped with a parent proc that reports completion of
the original log block. After issuing test requests, we terminate the
EM server only after the log block is complete, or if we checked on the
log block more than a user-definable number of times.
@log_block_checks ||= 0
@log_block_checks += 1

if log_block_complete? || @log_block_checks > @max_log_block_checks
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps we should raise if we hit @max_log_block_checks?

@dj2
Copy link
Contributor

dj2 commented May 15, 2013

Honestly, this feels like a hack. We're working around the missing functionality in EM when it should really be in EM. This seems like the kind of thing people would be interested in generally.

@kybishop
Copy link
Contributor Author

Fair enough, I'll raise an issue in eventmachine.

@kybishop
Copy link
Contributor Author

I've posted an issue to eventmachine . . and I found a bug in some edge cases. Closing this pull request.

@kybishop kybishop closed this May 15, 2013
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.

test_helper requests stop the server before logging can finish when the logger uses async methods
2 participants