mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-22 17:52:30 +01:00
Fix racing test
This commit is contained in:
parent
b17a7cfa95
commit
7706bd9845
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,7 @@ func TestServer_PublishAndSubscribe(t *testing.T) {
|
||||||
|
|
||||||
publishFirstRR := request(t, s, "PUT", "/mytopic", "my first message", nil)
|
publishFirstRR := request(t, s, "PUT", "/mytopic", "my first message", nil)
|
||||||
require.Equal(t, 200, publishFirstRR.Code)
|
require.Equal(t, 200, publishFirstRR.Code)
|
||||||
|
time.Sleep(500 * time.Millisecond) // Publishing is done asynchronously, this avoids races
|
||||||
|
|
||||||
publishSecondRR := request(t, s, "PUT", "/mytopic", "my other message", map[string]string{
|
publishSecondRR := request(t, s, "PUT", "/mytopic", "my other message", map[string]string{
|
||||||
"Title": " This is a title ",
|
"Title": " This is a title ",
|
||||||
|
|
Loading…
Reference in a new issue