Community
Participate
Working Groups
Build Identifier: WTP I-3.4.0-20110804154232 JUnit report: http://build.eclipse.org/webtools/committers/wtp-R3.4.0-I/20110804154232/I-3.4.0-20110804154232/testResults/html/org.eclipse.wst.server.ui.tests.AllTests.html In the tests: 1. testRunOnServerWizard 2. testModifyModulesWizard 3. testNewRuntimeWizard 4. testNewServerWizard They all fail with the assertion error: "Warning: Label {} Actual Width -> 5 Recommended Width -> 64" The actual width and recommended width is checked when all the children composite elements of a UI are verified with org.eclipse.wst.server.ui.tests.dialog.UITestHelper.verifyCompositeText(Composite). This will include empty labels (composite elements are attempted to be cast as a label, and if it succeeds, it will check it's actual width vs recommended width). With the setup: - eclipse + WTP I-3.4.0-20110804154232 - Win XP SP3 - org.eclipse.wst.server.ui.tests plugin checked out via CVS The issue could not be reproduced using the largest and smallest resolution on my machine. Reproducible: Couldn't Reproduce
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