C-Sharp icon indicating copy to clipboard operation
C-Sharp copied to clipboard

Coverage Issue for HashTable and TimSorter Reducing Overall Code Coverage

Open Kalkwst opened this issue 1 year ago • 6 comments

Summary We’ve encountered a coverage issue related to two classes, HashTable and TimSorter, which is impacting the overall code coverage in our project. Despite the current PR achieving 100% coverage for the changes it introduces, these two classes are not meeting the coverage standards, which is causing a blockage due to Codecov warnings.

To Reproduce

  1. Update your branch with the latest changes from master.
  2. Run Codecov or check the coverage report.
  3. Observe that the overall coverage is lowered due to the indirect changes affecting HashTable and TimSort.

Expected behavior

  • HashTable and TimSort should have adequate unit test coverage.
  • The overall coverage metric should reflect a high coverage rate, ideally not impacted negatively by indirect changes.

Actual behavior

  • HashTable and TimSort are not covered sufficiently.
  • The overall coverage metric is reduced, leading to Codecov warnings and PR blockage.

image

Kalkwst avatar Aug 21 '24 09:08 Kalkwst

Thank you for opening the issue, it probably happens because of randomization in tests, so coverage fluctuates a bit. I tried fixing some places where this happened, but never got to all of them. Just to make it clear, you are working on a fix, right? I'll assign you to the issue then

siriak avatar Aug 21 '24 10:08 siriak

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 21 '24 00:09 github-actions[bot]

seems this bug fixed with PR 486

ngtduc693 avatar Oct 24 '24 15:10 ngtduc693

#486 didn't change the classes in question or their tests, so I think the issue is still present

siriak avatar Oct 25 '24 15:10 siriak

Hi siriak is this issue still opened, an you assigned it to me? I think I can work on it. I could rescue my account back.

gmottajr avatar Nov 26 '24 00:11 gmottajr

is any one still working on this?

kabon9o avatar May 05 '25 16:05 kabon9o

The issue is still present, at least for TimSorter. Feel free to pick it up

Image

siriak avatar Jul 11 '25 17:07 siriak

So, the issue was lines 373-375 was not covered by the tests? Is anyone still working on this issue?

Jccqt avatar Jul 17 '25 11:07 Jccqt

They are covered sporadically by randomized tests, but this means sometimes they are not covered and coverage check fails on pull requests that are not related to TimSorter. I think noone is working on it now, so you can start. What we need is a deterministic test that covers this branch

siriak avatar Jul 17 '25 16:07 siriak

If the timsort tests still need fixing can I pick this up?

kamikkels avatar Sep 19 '25 01:09 kamikkels

Yes, please pick it up

siriak avatar Sep 20 '25 13:09 siriak

Let's keep it open for a while, but then close it if the issue is resolved completely

siriak avatar Oct 01 '25 21:10 siriak

@kamikkels the issue is still present in HashTable

Image

siriak avatar Oct 02 '25 14:10 siriak

ahh, I think testing that bit might require some reflection edit: nope, for some reason I though resize was private, test added for resize with a negative key

kamikkels avatar Oct 03 '25 08:10 kamikkels

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 03 '25 00:11 github-actions[bot]

I think it´s resolved

siriak avatar Nov 03 '25 08:11 siriak