Helper to check handler details. Does not do assertions. Only logs for debugging purposes.
(t *testing.T, expectedData, actualData []byte, expectedID, actualID string)
| 218 | |
| 219 | // Helper to check handler details. Does not do assertions. Only logs for debugging purposes. |
| 220 | func isExpectedMessage(t *testing.T, expectedData, actualData []byte, expectedID, actualID string) bool { |
| 221 | ret := string(expectedData) == string(actualData) && expectedID == actualID |
| 222 | if !ret { |
| 223 | t.Logf("expectedData: %s, actualData: %s, expectedID: %s, actualID: %s", |
| 224 | expectedData, actualData, expectedID, actualID) |
| 225 | } |
| 226 | |
| 227 | return ret |
| 228 | } |
| 229 | |
| 230 | func TestSubscribe_ErrorHandling(t *testing.T) { |
| 231 | ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) |
no outgoing calls
no test coverage detected