[MM-24123] Fix flaky TestGetLinkMetadata (#14654)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b660ffee01
Коммит
cedcb63e83
@@ -12,6 +12,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
@@ -1872,7 +1873,7 @@ func TestGetLinkMetadata(t *testing.T) {
|
|||||||
assert.Nil(t, og)
|
assert.Nil(t, og)
|
||||||
assert.Nil(t, img)
|
assert.Nil(t, img)
|
||||||
assert.NotNil(t, err)
|
assert.NotNil(t, err)
|
||||||
assert.Contains(t, err.Error(), "Client.Timeout")
|
assert.True(t, os.IsTimeout(err))
|
||||||
|
|
||||||
ogFromCache, imgFromCache, ok := getLinkMetadataFromCache(requestURL, timestamp)
|
ogFromCache, imgFromCache, ok := getLinkMetadataFromCache(requestURL, timestamp)
|
||||||
assert.True(t, ok)
|
assert.True(t, ok)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user