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

RSpec test suite hangs intermittently unless sync! has been called #234

Closed
keithrbennett opened this issue Oct 5, 2022 · 1 comment
Closed

Comments

@keithrbennett
Copy link
Contributor

Environment

  • SemanticLogger version: 4.11.0
  • Ruby version 2.7.6
  • OS versions: Mac OS 12.6, Centos 7
  • No Rails or other web frameworks

Expected Behavior

The RSpec test suite completes successfully (whether there are failures or not).

Actual Behavior

After having replaced our older custom logging code with SemanticLogger, the RSpec test suite intermittently hangs at random places. We are using SemanticLogger version 4.11.0, and this occurs on both Mac OS 12.6 and Centos 7.

When we call sync! to eliminate the separate logging thread, the hanging disappears and the test suite finishes successfully.

I cannot say with any certainty that it is a SemanticLogger bug, but neither can I think of anything we're doing that would cause this.

Is there anything you can think of that would cause this behavior?

In case it matters, I am calling flush after each example:

    rspec_config.after(:each) do
      SemanticLogger.flush
    end
@keithrbennett
Copy link
Contributor Author

keithrbennett commented Dec 25, 2022

@reidmorrison I suggest you use @eviljoel 's MR to resolve this. His solution works now, is simpler, and it's likely that most people won't care about the time it takes to wait for the thread to close. I'm not sure if he has updated it after your refactoring though.

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