Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/common/debug/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ package debug
import (
"encoding/json"
"fmt"
"sort"
"strings"
"sync"

"go.uber.org/atomic"
Expand Down Expand Up @@ -75,6 +77,9 @@ func (ati *activityTrackerImpl) Stats() Activities {
}{Info: a, Count: count})
}
}
sort.Slice(activities, func(i, j int) bool {
return strings.Compare(strings.ToLower(activities[i].Info.ActivityType), strings.ToLower(activities[j].Info.ActivityType)) < 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting makes perfect sense, but there's no reason to ToLower here afaict. It'll just make things more ambiguous than they are IRL, where strings need to be identical in both workers and example-test output checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

})
return activities
}

Expand Down
Loading