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

Key: WW-1480
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: tm_jee
Reporter: Konstantin Pribluda
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Unit test fail randomly on different boxes

Created: 23/Sep/07 09:25 AM   Updated: 23/Sep/07 11:46 AM
Component/s: None
Affects Version/s: 2.2.7
Fix Version/s: 2.2.7

File Attachments: 1. Text File urlxml.patch (15 kb)

Environment: Any

Flags: Important, Patch


 Description  « Hide
Since WW uses HashMaps internally to generate URLs,
resulting strings are not consistent between different javaversions or
OS versions ( as said in sun javadoc - order of entries is not given
and may change without notice )

Thus all the tests where string is used to compare result, are subject to
random test falures for different users.
Provided patch fices test cases to use URL helpers to generate expected strings ,
ensuring consistent ordering.

Another issue is renderng of XML documents which also may slightly change.
To overcome problem with String comparisos, I employed XMLunit
( used with a great success by xdoclet-2 plugins to test generated xml files )

Patch is attached.




 All   Comments   Change History      Sort Order:
Konstantin Pribluda - [23/Sep/07 09:25 AM ]
patch for problems with unt tests

tm_jee - [23/Sep/07 11:45 AM ]
Fixed in svn trunk.

As always thanks Konstantin. :-)