Projects STRLCPY scorecard Commits cc54d427
🤬
  • 🐛 Add tie breaker when sorting changesets by RevisionID in tests. (#2781)

    * Remove duplicate RevisionID collision from changeset tests.
    
    The map iteration order isn't deterministic and sorting the slices isn't good enough when the revision IDs are equal.
    
    Signed-off-by: Spencer Schrock <[email protected]>
    
    * remove any potential sha collisions
    
    Signed-off-by: Spencer Schrock <[email protected]>
    
    * Revert deduplications.
    
    Signed-off-by: Spencer Schrock <[email protected]>
    
    * Use ReviewPlatform as tie breaker.
    
    Signed-off-by: Spencer Schrock <[email protected]>
    
    ---------
    
    Signed-off-by: Spencer Schrock <[email protected]>
  • Loading...
  • Spencer Schrock committed with GitHub 1 year ago
    cc54d427
    1 parent ed556949
  • ■ ■ ■ ■ ■ ■
    checks/raw/code_review_test.go
    skipped 357 lines
    358 358   changesets := getChangesets(tt.commits)
    359 359   if !cmp.Equal(tt.expected, changesets,
    360 360   cmpopts.SortSlices(func(x, y checker.Changeset) bool {
     361 + if x.RevisionID == y.RevisionID {
     362 + return x.ReviewPlatform < y.ReviewPlatform
     363 + }
    361 364   return x.RevisionID < y.RevisionID
    362 365   }),
    363 366   cmpopts.SortSlices(func(x, y clients.Commit) bool {
    skipped 8 lines
Please wait...
Page is in error, reload to recover