Merge pull request #876 from hmhealey/echotestfix
Added slight delay to TestEchoCommand to account for race condition
Этот коммит содержится в:
@@ -6,6 +6,7 @@ package api
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/mattermost/platform/model"
|
"github.com/mattermost/platform/model"
|
||||||
"github.com/mattermost/platform/store"
|
"github.com/mattermost/platform/store"
|
||||||
@@ -176,6 +177,8 @@ func TestEchoCommand(t *testing.T) {
|
|||||||
t.Fatal("Echo command failed to execute")
|
t.Fatal("Echo command failed to execute")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
|
||||||
p1 := Client.Must(Client.GetPosts(channel1.Id, 0, 2, "")).Data.(*model.PostList)
|
p1 := Client.Must(Client.GetPosts(channel1.Id, 0, 2, "")).Data.(*model.PostList)
|
||||||
if len(p1.Order) != 1 {
|
if len(p1.Order) != 1 {
|
||||||
t.Fatal("Echo command failed to send")
|
t.Fatal("Echo command failed to send")
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user