Migrate CommandWebhook.TryUse to sync by default (#11593)

Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-07-09 16:57:05 -04:00
коммит произвёл Jesús Espino
родитель ff89b2c8e1
Коммит 678c8f4f84
5 изменённых файлов: 18 добавлений и 21 удалений

Просмотреть файл

@@ -63,11 +63,11 @@ func testCommandWebhookStore(t *testing.T, ss store.Store) {
t.Fatal("Should have set the status as not found for expired webhook")
}
if err := (<-cws.TryUse(h1.Id, 1)).Err; err != nil {
if err := cws.TryUse(h1.Id, 1); err != nil {
t.Fatal("Should be able to use webhook once")
}
if err := (<-cws.TryUse(h1.Id, 1)).Err; err == nil || err.StatusCode != http.StatusBadRequest {
if err := cws.TryUse(h1.Id, 1); err == nil || err.StatusCode != http.StatusBadRequest {
t.Fatal("Should be able to use webhook once")
}
}