1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-12-22 17:52:30 +01:00

A mutex in a test struct ...

This commit is contained in:
Philipp Heckel 2021-12-24 00:10:22 +01:00
parent 7280ae1ebc
commit 6b46eb46e2

View file

@ -11,6 +11,7 @@ import (
"os"
"path/filepath"
"strings"
"sync"
"testing"
"time"
)
@ -510,9 +511,12 @@ func TestServer_Curl_Publish_Poll(t *testing.T) {
type testMailer struct {
count int
mu sync.Mutex
}
func (t *testMailer) Send(to string, m *message) error {
t.mu.Lock()
defer t.mu.Unlock()
t.count++
return nil
}