MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / waitForFCMPush

Function waitForFCMPush

tests/helpers_test.go:304–318  ·  view source on GitHub ↗
(t *testing.T, messageID string, timeout time.Duration)

Source from the content-addressed store, hash-verified

302}
303
304func 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
320type BulkMessageEntry struct {
321 RequestID string `json:"request_id"`

Callers 5

TestSendSMS_EncryptedFunction · 0.85
TestSendSMS_RateLimitFunction · 0.85
TestBulkSMS_CSVFunction · 0.85
TestBulkSMS_ExcelFunction · 0.85

Calls 1

findFCMRequestsFunction · 0.85

Tested by

no test coverage detected