You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a program that communicated between threads via a channel.
To test an error condition in the receiver, I wrote
Convey("Passing bad operations to send should panic worker", func(c C) {
// the panic happens in worker(), not send,
c.So(func() { r.send(-1, Err, 1) }, ShouldPanic)
})
r.send sends an illegal -1, the worker thread duly panics, and send returns without error, rather than reporting that a different thread panicked.
How do I construct a test that detects a panic in another thread? Can I?
The text was updated successfully, but these errors were encountered:
I have a program that communicated between threads via a channel.
To test an error condition in the receiver, I wrote
r.send sends an illegal -1, the worker thread duly panics, and send returns without error, rather than reporting that a different thread panicked.
How do I construct a test that detects a panic in another thread? Can I?
The text was updated successfully, but these errors were encountered: