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

ASF GitHub Bot commented on DISPATCH-2327:
------------------------------------------

jiridanek commented on a change in pull request #1512:
URL: https://github.com/apache/qpid-dispatch/pull/1512#discussion_r804047423



##########
File path: tests/system_tests_multi_tenancy.py
##########
@@ -229,6 +231,17 @@ def 
test_16_two_router_anonymous_sender_tenant_on_both(self):
         test.run()
         self.assertIsNone(test.error)
 
+    def _cleanup_link_routes(func):

Review comment:
       > Yeah in the end I'm punting on the decorator approach: too many issues 
with the python linters.
   
   If the only problem is the linter, that should not be hard to put right. Put 
the decorator as a standalone top level method in the module, and the warning 
you got should be gone! You were not relying on it being an instance method 
anyway.
   
   ```python
   def _cleanup_link_routes(func):
       @functools.wraps(func)
       def wrapper(self, *args, **kwargs):
           result = func(self, *args, **kwargs)
           # TODO something here
           return result
       return wrapper
   
   class TestClass(unittest.TestCae):
       def __init__(self, a=1, b=2):
       @decorate
       def test_something(self):
           pass
   ```
   
   I'm not sure what other problems there might be with it. I'd have to 
actually try it, and I don't want to poke into tests that I don't understand.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> system_tests_multi_tenancy flaky link route test failures
> ---------------------------------------------------------
>
>                 Key: DISPATCH-2327
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2327
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 1.18.0
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>            Priority: Major
>             Fix For: 1.19.0
>
>
> Very occasionally one of the linkRoute tests in the 
> system_tests_multi_tenancy.py ctests will fail:
> 38: FAIL: test_22_two_router_link_route_targeted_no_tenant 
> (system_tests_multi_tenancy.RouterTest)                                       
>          
> 38: ----------------------------------------------------------------------    
>                                                      
> 38: Traceback (most recent call last):                                        
>                                                
> 38:   File "/home/kgiusti/work/dispatch/qpid-dispatch/test 
> /system_tests_multi_tenancy.py", line 290, in 
> test_22_two_router_link_route_targeted_no_tenant                              
>                                  
> 38:     self.assertIsNone(test.error)                                         
>                                                                     
> 38: AssertionError: 'Timeout Expired: n_sent=0 n_rcvd=0 n_settled=0' is not 
> None                                                                  
> Examining the router logs it appears as if the attempt to use the link route 
> is rejected with a "no route" error.
> I believe the problem is that each test uses the same link route configured 
> address.  Each test starts by establishing the route container connection 
> then polls the routers waiting for the link route address to propagate.  Once 
> the poll succeeds the test starts.
> IIUC what is happening is that at the end of each test the link route address 
> may still exist in the route tables - it has not been totally removed.  This 
> causes the next test's poll to immediately succeed before the test's link 
> route has been properly propagated.  This results in the failure if the new 
> link route doesn't establish itself before traffic is sent.
> The fix is to have each test wait for all link route addresses to be removed 
> from the routing tables before the test ends.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to