Skip to content

Commit

Permalink
"Fix" concurrency problem
Browse files Browse the repository at this point in the history
It was actually the string builder not being reset
  • Loading branch information
simonswine committed Feb 7, 2023
1 parent 861ba9d commit 59ba775
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/phlaredb/profile_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ func TestProfileStore_Querying(t *testing.T) {
require.NoError(t, err)

for _, x := range p.Sample {
sb.Reset()
for _, loc := range x.Location {
for _, line := range loc.Line {
sb.WriteString(line.Function.Name)
Expand All @@ -465,7 +466,7 @@ func TestProfileStore_Querying(t *testing.T) {
}
assert.Equal(
t,
map[string]int64{"func1/func2": 90, "func1/func2/func1": 180},
map[string]int64{"func1/func2": 90, "func1": 180},
values,
)
})
Expand Down

0 comments on commit 59ba775

Please sign in to comment.