From 663bec814767fa9c92e7ab2c706c0fe4c0432cf1 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 26 Oct 2015 11:45:03 -0400 Subject: Moved logic for searching for posts by multiple users/channels into the sql query --- api/post_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'api') diff --git a/api/post_test.go b/api/post_test.go index 3df622d84..e54e9ef0c 100644 --- a/api/post_test.go +++ b/api/post_test.go @@ -546,6 +546,9 @@ func TestSearchPostsFromUser(t *testing.T) { Client.Must(Client.JoinChannel(channel1.Id)) Client.Must(Client.JoinChannel(channel2.Id)) + // wait for the join/leave messages to be created for user3 since they're done asynchronously + time.Sleep(100 * time.Millisecond) + if result := Client.Must(Client.SearchPosts("from: " + user2.Username)).Data.(*model.PostList); len(result.Order) != 3 { t.Fatalf("wrong number of posts returned %v", len(result.Order)) } -- cgit v1.2.3-1-g7c22