(t *testing.T, ctx context.Context, exec riverdriver.Executor, schema, queue, action string, metadata []byte)
| 814 | } |
| 815 | |
| 816 | func emitQueueNotification(t *testing.T, ctx context.Context, exec riverdriver.Executor, schema, queue, action string, metadata []byte) { |
| 817 | t.Helper() |
| 818 | |
| 819 | payload := map[string]any{ |
| 820 | "queue": queue, |
| 821 | "action": action, |
| 822 | } |
| 823 | if metadata != nil { |
| 824 | payload["metadata"] = metadata |
| 825 | } |
| 826 | |
| 827 | payloadBytes, err := json.Marshal(payload) |
| 828 | require.NoError(t, err) |
| 829 | |
| 830 | err = exec.NotifyMany(ctx, &riverdriver.NotifyManyParams{ |
| 831 | Topic: string(notifier.NotificationTopicControl), |
| 832 | Payload: []string{string(payloadBytes)}, |
| 833 | Schema: schema, |
| 834 | }) |
| 835 | require.NoError(t, err) |
| 836 | } |
no test coverage detected
searching dependent graphs…