lock on every http req BUT LOCKS ON TELEMETRY SO BEWARE

This commit is contained in:
Bel LaPointe
2023-03-27 06:18:32 -06:00
parent f14871218d
commit 85804d6f84
5 changed files with 16 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package v01
import (
"fmt"
"sync"
"testing"
)
@@ -70,7 +71,10 @@ func TestConfigPatch(t *testing.T) {
for name, d := range cases {
c := d
t.Run(name, func(t *testing.T) {
c.cfg.lock = &sync.Mutex{}
got := c.cfg.WithPatch(c.patch)
got.lock = nil
c.want.lock = nil
if fmt.Sprintf("%+v", got) != fmt.Sprintf("%+v", c.want) {
t.Errorf("(%+v).Patch(%+v) want %+v, got %+v", c.cfg, c.patch, c.want, got)
}