summaryrefslogtreecommitdiffstats
path: root/app/post_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-04 13:09:41 -0700
committerGitHub <noreply@github.com>2017-10-04 13:09:41 -0700
commit07777f5ff9e0bde26abd0288164e5f73b6da992a (patch)
treeb0aa1eff510d1531d2924522e0e6f0e9bfd7ac29 /app/post_test.go
parentdc9b1a1d6a0fe7ad2e18597cb46f3874736b4b40 (diff)
downloadchat-07777f5ff9e0bde26abd0288164e5f73b6da992a.tar.gz
chat-07777f5ff9e0bde26abd0288164e5f73b6da992a.tar.bz2
chat-07777f5ff9e0bde26abd0288164e5f73b6da992a.zip
Fix races / finally remove global app for good (#7570)
* finally remove global app for good * test compilation fixes * fix races * fix deadlock * wake up write pump so it doesn't take forever to clean up
Diffstat (limited to 'app/post_test.go')
-rw-r--r--app/post_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/post_test.go b/app/post_test.go
index 92eb8857e..5fa3d50d6 100644
--- a/app/post_test.go
+++ b/app/post_test.go
@@ -20,6 +20,7 @@ import (
func TestUpdatePostEditAt(t *testing.T) {
th := Setup().InitBasic()
+ defer th.TearDown()
post := &model.Post{}
*post = *th.BasicPost
@@ -47,6 +48,7 @@ func TestPostReplyToPostWhereRootPosterLeftChannel(t *testing.T) {
// This test ensures that when replying to a root post made by a user who has since left the channel, the reply
// post completes successfully. This is a regression test for PLT-6523.
th := Setup().InitBasic()
+ defer th.TearDown()
channel := th.BasicChannel
userInChannel := th.BasicUser2
@@ -78,6 +80,7 @@ func TestPostReplyToPostWhereRootPosterLeftChannel(t *testing.T) {
func TestPostAction(t *testing.T) {
th := Setup().InitBasic()
+ defer th.TearDown()
allowedInternalConnections := *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections
defer func() {