(t *testing.T, messageID string, timeout time.Duration)
| 302 | } |
| 303 | |
| 304 | func waitForFCMPush(t *testing.T, messageID string, timeout time.Duration) []wmJournal.GetRequestResponse { |
| 305 | t.Helper() |
| 306 | deadline := time.Now().Add(timeout) |
| 307 | |
| 308 | for time.Now().Before(deadline) { |
| 309 | requests := findFCMRequests(t, messageID) |
| 310 | if len(requests) >= 1 { |
| 311 | return requests |
| 312 | } |
| 313 | time.Sleep(500 * time.Millisecond) |
| 314 | } |
| 315 | |
| 316 | t.Fatalf("FCM push for message %s not found within %v", messageID, timeout) |
| 317 | return nil |
| 318 | } |
| 319 | |
| 320 | type BulkMessageEntry struct { |
| 321 | RequestID string `json:"request_id"` |
no test coverage detected