[MM-24123] Fix flaky TestGetLinkMetadata (#14654)

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Claudio Costa
2020-05-27 13:58:05 +02:00
коммит произвёл GitHub
родитель b660ffee01
Коммит cedcb63e83

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

@@ -12,6 +12,7 @@ import (
"net/http"
"net/http/httptest"
"net/url"
"os"
"strconv"
"strings"
"testing"
@@ -1872,7 +1873,7 @@ func TestGetLinkMetadata(t *testing.T) {
assert.Nil(t, og)
assert.Nil(t, img)
assert.NotNil(t, err)
assert.Contains(t, err.Error(), "Client.Timeout")
assert.True(t, os.IsTimeout(err))
ogFromCache, imgFromCache, ok := getLinkMetadataFromCache(requestURL, timestamp)
assert.True(t, ok)