| Summary: | [build] show accurate health information | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Steffen Pingel <steffen.pingel> | ||||||||||||||
| Component: | Mylyn | Assignee: | Markus Knittig <markus> | ||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||
| Severity: | normal | ||||||||||||||||
| Priority: | P3 | Keywords: | contributed | ||||||||||||||
| Version: | unspecified | ||||||||||||||||
| Target Milestone: | 0.7 | ||||||||||||||||
| Hardware: | PC | ||||||||||||||||
| OS: | Linux | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Steffen Pingel
Created attachment 174188 [details]
Include additional attributes
Have only excluded the build tag for now. Potential other optimizations: Exclude firstBuild, lastBuild, lastCompletedBuild, lastFailedBuild, lastStableBuild and/or lastSuccessfulBuild tags.
Created attachment 174189 [details]
mylyn/context/zip
Ah, there's the "&" too much. Could you check if part of the patch is missing? I don't see where the health information is actually parsed and set on the build job object. Created attachment 174219 [details]
Adds and parses healthReport
Ah, sorry, missed that. This might get a bit trickier, since there can be more than one healthReport tag (typically build stability and test results). It looks like the lowest value determinants the icon, so I'm using that for now.
Created attachment 174220 [details]
mylyn/context/zip
Thanks. Can you add a test case and combine everything in one patch (makes tracking stuff in the iplog easier)? Created attachment 174239 [details]
Includes and parses healthReport
Sure, should have thought about that in the first place.
Created attachment 174240 [details]
mylyn/context/zip
Thanks! I have applied the patch with some modifications: * If a build did not have health information set (e.g. test-disabled) it would get a health of 100 instead of -1. I modified the initialization slightly to address that. * I made the parseJob() method public. The problem is that package protected access does not work across bundles when tests are running as Eclipse plug-in tests. http://michaelscharf.blogspot.com/2008/04/is-osgi-enemy-of-junit-tests_17.html has some more background on that. * I added the test class to the AllHudsonTest suite. That is the suite that we are going to use for running tests eventually and all tests should be referenced here. * When doing asserts always pass the expected value as the first argument, e.g.: assertEquals(80, behaviour.parseJob(job).getHealth()); I also fixed the view refresh which I broke a few days ago so the right icons should now actually show up in the view :). |