From 6bf080393d88534aa658ecaff32ae089bd304772 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Tue, 4 Apr 2017 11:42:07 -0700 Subject: Fixing race conditions in the code base (#5966) * Adding initial race detector * Remove setting of config twice * Fixing config file watch and config reload on license save * Fixing config file watch and config reload on license save * Fixing build error * Fixing locking issue * Fixing makefile * Fixing race in config * Fixing race in status unit test * Adding EE race tests * Fixing race in cluster info * Removing code that's isn't needed * Fixing some more races * Fixing govet issue --- model/cluster_info_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/cluster_info_test.go') diff --git a/model/cluster_info_test.go b/model/cluster_info_test.go index d6348f5d1..e7aa9cd16 100644 --- a/model/cluster_info_test.go +++ b/model/cluster_info_test.go @@ -16,6 +16,16 @@ func TestClusterInfoJson(t *testing.T) { if cluster.Id != result.Id { t.Fatal("Ids do not match") } + + cluster.SetAlive(true) + if !cluster.IsAlive() { + t.Fatal("should be live") + } + + cluster.SetAlive(false) + if cluster.IsAlive() { + t.Fatal("should be not live") + } } func TestClusterInfosJson(t *testing.T) { -- cgit v1.2.3-1-g7c22