failOnceMessagingClient wraps fakeMessagingClient but fails the Publish call at index failOn (0-based) and succeeds all others.
| 224 | // failOnceMessagingClient wraps fakeMessagingClient but fails the Publish call |
| 225 | // at index failOn (0-based) and succeeds all others. |
| 226 | type failOnceMessagingClient struct { |
| 227 | inner *fakeMessagingClient |
| 228 | failOn int |
| 229 | callIdx int |
| 230 | mu sync.Mutex |
| 231 | } |
| 232 | |
| 233 | func (f *failOnceMessagingClient) Publish(subject string, data any) error { |
| 234 | f.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected