From 7ea4b6fe6f04a388f96e1b7c89e91a247ebc64d3 Mon Sep 17 00:00:00 2001 From: Caleb Doxsey Date: Wed, 1 Nov 2023 13:26:50 -0600 Subject: [PATCH] more time --- config/layered_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config/layered_test.go b/config/layered_test.go index 4db44eaff..97aebbeca 100644 --- a/config/layered_test.go +++ b/config/layered_test.go @@ -38,17 +38,14 @@ func TestLayeredConfig(t *testing.T) { require.NoError(t, err) var dst atomic.Pointer[config.Config] + dst.Store(layered.GetConfig()) layered.OnConfigChange(ctx, func(ctx context.Context, c *config.Config) { dst.Store(c) }) underlying.SetConfig(ctx, &config.Config{Options: &config.Options{DeriveInternalDomainCert: proto.String("b.com")}}) assert.Eventually(t, func() bool { - cfg := dst.Load() - if cfg == nil { - return false - } - return cfg.Options.GetDeriveInternalDomain() == "b.com" - }, time.Second, time.Millisecond) + return dst.Load().Options.GetDeriveInternalDomain() == "b.com" + }, 10*time.Second, time.Millisecond) }) }