summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-30 11:39:21 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-30 11:39:21 -0400
commit1366557abb1af7a97aa6d7859d3dce329ab74c7a (patch)
treeee77f9f74f36b51225117d445297a34a6968ac95
parent9dee8cd2d77b48bcd250bfbfc0f2f1c398364359 (diff)
parent8a5ab6a56fcf428bded859c2325d7ef998fa116b (diff)
downloadchat-1366557abb1af7a97aa6d7859d3dce329ab74c7a.tar.gz
chat-1366557abb1af7a97aa6d7859d3dce329ab74c7a.tar.bz2
chat-1366557abb1af7a97aa6d7859d3dce329ab74c7a.zip
Merge pull request #876 from hmhealey/echotestfix
Added slight delay to TestEchoCommand to account for race condition
-rw-r--r--api/command_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/command_test.go b/api/command_test.go
index d70729448..360c4da58 100644
--- a/api/command_test.go
+++ b/api/command_test.go
@@ -6,6 +6,7 @@ package api
import (
"strings"
"testing"
+ "time"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/store"
@@ -176,6 +177,8 @@ func TestEchoCommand(t *testing.T) {
t.Fatal("Echo command failed to execute")
}
+ time.Sleep(100 * time.Millisecond)
+
p1 := Client.Must(Client.GetPosts(channel1.Id, 0, 2, "")).Data.(*model.PostList)
if len(p1.Order) != 1 {
t.Fatal("Echo command failed to send")