History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16737
Type: Bug Bug
Status: Waiting for Reply Waiting for Reply
Assignee: Anton Makeev
Reporter: Andrei Oprea
Votes: 6
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Flaky code coverage data

Created: 20 Dec 07 05:22   Updated: 29 May 08 22:11
Component/s: Code Coverage

File Attachments: None
Image Attachments:

1. partialCoverageDisplay.png
(16 kb)

Build: 7,590
Severity: High


 Description  « Hide
Code coverage info does not seem to be available for all the code. When displaying the gutter markers for code coverage, lots of area remain completely uncovered (showing neither green nor red). Have seen this for a while now.

Maybe not related, but I remember having issues with code coverage displays when running under java 6, back in the day when IDEA was still shipped with java 5. They went away later, though, so this time might be a completely unrelated issue.

I attached an example for a class where I'd expect to see more coverage info. I know for a fact that there's more code covered there to start with, but apart from that I'd still expect red for the uncovered parts.



 All   Comments   Work Log   Change History      Sort Order:
Andrei Oprea - 20 Dec 07 22:16
Just noticed that the coverage data seems to be correct. For the class in the screenshot, the coverage information in the project tree shows 100% methods, 100% lines covered. So it looks like only the gutter display is faulty.

Anna Kozlova - 04 Mar 08 12:48
Could you please check 7.0.3 RC? Thank you

Andrei Oprea - 04 Mar 08 21:49
It got worse, actually.

Most of the classes show the "coverage data outdated" label at the top and show no coverage in the gutter whatsoever. The tree structure does display coverage info (and selecting different coverage data does seem to be applied, even for the teamcity produced info), but I see now way to get rid of the outdated warning, it stays there even after a fresh run.

I don't see any pattern when it comes to the files reporting outdated coverage, it happens for most files in every package, with the exception of a few, that seem to be OK for no apparent reason.


Anna Kozlova - 05 Mar 08 11:35
Outdated coverage label is based on Local History. If it is able to create correspondence between current line numbers and ones from coverage run time then it is ok otherwise you can see this 'outdated' label. So my question is - do you have any exceptions in idea.log?
Thank you

Andrei Oprea - 05 Mar 08 18:43
Nope, no errors in the log. Loads of info coming from the CommittedChangesCache about changelists, but nothing suspect related to local history.

Brian Slesinsky - 12 Apr 08 05:51
I'm seeing this issue as well. For a file that has not changed in a month, there is no Local History and therefore no code coverage is displayed. In another file in the same directory that I edited, it works fine. Editing the file and reverting the change causes a Local History entry to be created and then code coverage is displayed.

Ray Suliteanu - 28 Apr 08 21:01
I can't seem to get rid of the 'coverage data outdated' problem either, no matter how many times I rerun the coverage ... linking it to local history seems incorrect; it shouldn't have anything to do with when a file was last modified - I should just see my coverage data, period.

Trejkaz - 01 May 08 03:27
I'm seeing this too. Linking it to local history doesn't seem entirely wrong, it's just that if there is no local history it should Just Show It.

It's weird that putting a project-wide label doesn't create some history for all files though, otherwise that would have been a marvellous workaround for this bug. Is there some other way to do this without iterating through each file?


Martin Benda - 13 May 08 11:32
I can confirm this bug in Idea 7.0.3 (Linux). Touching a file (e.g. editing and reverting the change back) works for me...

Michael Kirby - 13 May 08 23:44 - edited
I'm seeing this as well (7.0.3, windows).

I can confirm that making a small change to the file fixes this. The next time the tests are run, coverage data comes back.

Making a change and then "reverting" it by simply erasing the change does not work.

I'm not using configuration control (just files in a project by itself).

Local history is set to the default (3 days with everything turned on).

Mike


Jorge Montero - 29 May 08 22:11
It still happens on Selena 7821 on Windows. Same symptoms, same results. The idea log shows nothing even remotely suspicious.