History returns a slice of RequestResponse pairs in the order they were processed by the broker. Note that in case of multiple connections to the broker the order expected by a test can be different from the order recorded in the history, unless some synchronization is implemented in the test.
()
| 126 | // broker the order expected by a test can be different from the order recorded |
| 127 | // in the history, unless some synchronization is implemented in the test. |
| 128 | func (b *MockBroker) History() []RequestResponse { |
| 129 | b.lock.Lock() |
| 130 | history := make([]RequestResponse, len(b.history)) |
| 131 | copy(history, b.history) |
| 132 | b.lock.Unlock() |
| 133 | return history |
| 134 | } |
| 135 | |
| 136 | // Port returns the TCP port number the broker is listening for requests on. |
| 137 | func (b *MockBroker) Port() int32 { |
no outgoing calls