[ 
https://issues.apache.org/jira/browse/QPID-7348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370589#comment-15370589
 ] 

Keith Wall commented on QPID-7348:
----------------------------------

Hi Alex

A couple of comments:

# {{org.apache.qpid.test.utils.QpidBrokerTestCase#QpidBrokerTestCase}} call to 
{{#overrideTestSystemProperties}} violates "Constructors must not invoke 
overridable methods, directly or indirectly. "
# Setting system properties (or anything else with JVM wide side effect) for a 
test's constructor is a bad idea.  Junit creates a separate instance of Test 
class for every test method *before* it starts running the tests (see 
junit.framework.TestSuite#addTestsFromTestCase).
 # For QBTC test cases, aren't we now calling #setTestSystemProperty twice 
(once in QTC's setup and once again from QBTC's constructor).  This means that 
the original value for the property will be lost as its entry in 
{{_propertiesSetForTest}} will be overridden.  Why it not the single call from 
{{QTC#setup}} sufficient?



> [Java Tests] Move functionality to override test system properties from QBTC 
> into QTC
> -------------------------------------------------------------------------------------
>
>                 Key: QPID-7348
>                 URL: https://issues.apache.org/jira/browse/QPID-7348
>             Project: Qpid
>          Issue Type: Test
>          Components: Java Tests
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>
> Currently QpidBrokerTestCase has an ability to override the test properties 
> from properties files. Thus, on slow environments the timeouts can be changed 
> and tests relying on timeouts would continue passing. The same ability is 
> required for unit tests. We need to move it from QBTC into QTC.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to