-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Test driver fixes for error handling #1305
Conversation
…ly in submit_flush_all
driver/output#run_actual flushes buffers and wait completion. If plugin authors want to wait completion of flushing, it should be done after run_actual.
@repeatedly could you review this change? |
@repeatedly ping? |
|
||
sleep_with_watching_threads = ->(){ | ||
if @instance.respond_to?(:_threads) | ||
@instance._threads.values.each{|t| t.join(0) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happen with 0
limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't wait for running threads with 0
.
LGTM |
This change follows #1302.
After #1302, I found that any errors in
#write
of output plugins are not raised in test case code like below:Errors are shown on console, but we can't test it.
This change is to check all threads via thread plugin helper, and re-raise errors from these threads at the end of
#run
method. It shows all errors in all threads related with plugins explicitly as test results - so there's no need to show these errors on console.Some changes are also included:
Process.clock_gettime
instead ofTime
to work well even whentimecop
is used#run_actual
, because output plugin test driver flushes and wait for completion of flushing in#run_actual