| Summary: | JUnit error in WTP 3.4.0: Actual width less than preferred width for empty labels | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Steven Hung <sghung> | ||||
| Component: | wst.server | Assignee: | Steven Hung <sghung> | ||||
| Status: | CLOSED FIXED | QA Contact: | Angel Vera <arvera> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eyuen7 | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.2.5 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| See Also: |
https://git.eclipse.org/r/109060 https://git.eclipse.org/r/109839 https://git.eclipse.org/c/servertools/webtools.servertools.git/commit/?id=52e2bad400f7794333615a42274697a33d02c9ea |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Steven Hung
Created attachment 200990 [details]
Patch v1.0
Since the issue could not be reproduced, the following patch will be used to:
a) Provide a potential fix for empty labels (empty labels should not have a width). Checking for widths for an empty label should not be required, as it would not result in cut-off text. Therefore, we should skip this check as it is not necessary.
b) Provide diagnostic information in case of failure, including some of the variables used to calculate the preferred width.
c) Performance improvement: moved the error message creation inside the conditional statement where an error occurred to avoid generating the message when no error has occurred.
Tests run:
1. Ran test with patch and ensured all the tests passed
2. Hacked in a fake label length into the method to cause a failure that would print out the diagnostic information
Code released to 32M, 33M and HEAD. In the latest 3.4.0 JUnit results, the error no longer occurs: http://build.eclipse.org/webtools/committers/wtp-R3.4.0-I/20110811033316/I-3.4.0-20110811033316/testResults/html/org.eclipse.wst.server.ui.tests.AllTests.html New Gerrit change created: https://git.eclipse.org/r/109060 New Gerrit change created: https://git.eclipse.org/r/109839 Gerrit change https://git.eclipse.org/r/109839 was merged to [master]. Commit: http://git.eclipse.org/c/servertools/webtools.servertools.git/commit/?id=52e2bad400f7794333615a42274697a33d02c9ea |