summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-12-22 06:09:33 -0600
committerGeorge Goldberg <george@gberg.me>2017-12-22 12:09:33 +0000
commit91bfc72a99477b6d611b13e225786e3ca7add10c (patch)
treec95b30741fb6ed8e57a356651c1c0fe88d30783a /store
parent5189e8ea105712a9d561d0dade80932cc2c0ccf9 (diff)
downloadchat-91bfc72a99477b6d611b13e225786e3ca7add10c.tar.gz
chat-91bfc72a99477b6d611b13e225786e3ca7add10c.tar.bz2
chat-91bfc72a99477b6d611b13e225786e3ca7add10c.zip
Reduce logging data races, fix MySQL test race condition (#7994)
* fix races * revert unintentional change * fix test as intended
Diffstat (limited to 'store')
-rw-r--r--store/storetest/user_store.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/store/storetest/user_store.go b/store/storetest/user_store.go
index 3b2bf502b..47f04d1bb 100644
--- a/store/storetest/user_store.go
+++ b/store/storetest/user_store.go
@@ -157,11 +157,12 @@ func testUserStoreUpdate(t *testing.T, ss store.Store) {
}
}
+ u3.Email = model.NewId()
if result := <-ss.User().Update(u3, true); result.Err != nil {
t.Fatal("Update should not have failed")
} else {
newUser := result.Data.([2]*model.User)[0]
- if newUser.Email != u3.Email {
+ if newUser.Email == oldEmail {
t.Fatal("Email should have been updated as the update is trusted")
}
}