Skip to content

Commit

Permalink
fix flakey test (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
alishakawaguchi authored Jan 27, 2024
1 parent 2043efa commit 961698e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cli/internal/cmds/neosync/sync/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,14 @@ func Test_groupConfigsByDependency(t *testing.T) {
assert.Len(t, groups, len(tt.expect))
for i, group := range groups {
assert.Equal(t, len(group), len(tt.expect[i]))
for j, cfg := range group {
assert.Equal(t, cfg.Name, tt.expect[i][j].Name)
assert.ElementsMatch(t, cfg.DependsOn, tt.expect[i][j].DependsOn)
expectedConfigMap := map[string]*benthosConfigResponse{}
for _, cfg := range tt.expect[i] {
expectedConfigMap[cfg.Name] = cfg
}
for _, cfg := range group {
expect := expectedConfigMap[cfg.Name]
assert.NotNil(t, expect)
assert.ElementsMatch(t, cfg.DependsOn, expect.DependsOn)
}
}
})
Expand Down

0 comments on commit 961698e

Please sign in to comment.