()
| 114 | } |
| 115 | |
| 116 | func (m *MockHttpServer) ReceiveRequest() (*http.Request, bool) { |
| 117 | atomic.AddInt32(&m.pendingMsgCount, 1) |
| 118 | request := <-m.Request |
| 119 | atomic.AddInt32(&m.pendingMsgCount, -1) |
| 120 | return request, !m.Closed // reading from closed channels works fine and just returns the default |
| 121 | } |
| 122 | |
| 123 | func (m *MockHttpServer) Respond(response *http.Response, err error) { |
| 124 | if m.Closed { |
no outgoing calls