Skip to content

Pre-allocate list size in tests#1810

Merged
martincostello merged 1 commit intoApp-vNext:mainfrom
martincostello:flaky-test
Nov 17, 2023
Merged

Pre-allocate list size in tests#1810
martincostello merged 1 commit intoApp-vNext:mainfrom
martincostello:flaky-test

Conversation

@martincostello
Copy link
Copy Markdown
Member

Try to avoid test flakiness from concurrent adds on a List<T> by pre-allocating what is hopefully enough capacity to avoid a re-size.

See #980 (comment).

Try to avoid test flakiness from concurrent adds on a `List<T>` by pre-allocating what is hopefully enough capacity to avoid a re-size.
@martincostello martincostello added this to the v8.3.0 milestone Nov 17, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (21a0e54) 84.59% compared to head (644d564) 84.59%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1810   +/-   ##
=======================================
  Coverage   84.59%   84.59%           
=======================================
  Files         308      308           
  Lines        6802     6802           
  Branches     1049     1049           
=======================================
  Hits         5754     5754           
  Misses        839      839           
  Partials      209      209           
Flag Coverage Δ
linux 84.59% <ø> (ø)
macos 84.59% <ø> (ø)
windows 84.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martincostello
Copy link
Copy Markdown
Member Author

Ran 3 times with no failure.

@martincostello martincostello marked this pull request as ready for review November 17, 2023 13:49
@martincostello martincostello merged commit efedace into App-vNext:main Nov 17, 2023
@martincostello martincostello deleted the flaky-test branch November 17, 2023 13:49
@martincostello martincostello modified the milestones: v8.3.0, v8.2.1 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant