[jboss-jira] [JBoss JIRA] Updated: (JBMESSAGING-158) Tidy up tests

Tim Fox (JIRA) jira-events at lists.jboss.org
Mon Apr 30 09:59:30 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBMESSAGING-158?page=all ]

Tim Fox updated JBMESSAGING-158:
--------------------------------

    Fix Version/s: 2.0.0 Beta 1
                       (was: Unscheduled)

> Tidy up tests
> -------------
>
>                 Key: JBMESSAGING-158
>                 URL: http://jira.jboss.com/jira/browse/JBMESSAGING-158
>             Project: JBoss Messaging
>          Issue Type: Task
>          Components: Tests and Performance
>    Affects Versions: 1.0.0 alpha PR3
>            Reporter: Ovidiu Feodorov
>            Priority: Minor
>             Fix For: 2.0.0 Beta 1
>
>   Original Estimate: 2 days, 4 hours
>  Remaining Estimate: 2 days, 4 hours
>
> Tidy up tests:
> - Some test classes (and notably MessageConsumerTest) do a lot of Connection/Session/Consumer/Producer creation in setUp(). The original idea was to separate as much boilerplate code as possible, but this leads to hard to understand tests and may lead to unexpected behavior, since the test my get "hidden" intialization it doesn't want. Refactor them and re-write each test to be as independent as possible.
> - For tests that send messages in a loop, use a centrally-configured loop counter, which can be easily globally modified. Stress test are more likely to exhibit edge cases and race conditions as the number of message increases, and it should be easy to control that number globally.
> Example
> public class Global
> {
>    public static final int GENERAL_COUNTER = 100;
>    ....
> }
> public class MyTest extends MessagingTestCase
> {
>      // override if it doesn't makes sense locally
>     protected int NUM_MESSAGES = Global.GENERAL_COUNTER;
>     ...
> }
>  
> - Some tests are not in the right file.
> When refactor tests, take extra care not to break their semantics, though.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list