qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1664742 - in /qpid/dispatch/trunk: python/qpid_dispatch/management/qdrouter.json tests/system_test.py tests/system_tests_management.py
Date Fri, 06 Mar 2015 22:40:02 GMT
Author: aconway
Date: Fri Mar  6 22:40:02 2015
New Revision: 1664742

URL: http://svn.apache.org/r1664742
Log:
NO-JIRA: Replace incorrect use of 0.0.0.0 with 127.0.0.1 in tests.

Modified:
    qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json
    qpid/dispatch/trunk/tests/system_test.py
    qpid/dispatch/trunk/tests/system_tests_management.py

Modified: qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json?rev=1664742&r1=1664741&r2=1664742&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json Fri Mar  6 22:40:02
2015
@@ -11,7 +11,7 @@
                 "addr": {
                     "description":"IP address: ipv4 or ipv6 literal or a host name.",
                     "type": "string",
-                    "default": "0.0.0.0",
+                    "default": "127.0.0.1",
                     "create": true
                 },
                 "port": {

Modified: qpid/dispatch/trunk/tests/system_test.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_test.py?rev=1664742&r1=1664741&r2=1664742&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_test.py (original)
+++ qpid/dispatch/trunk/tests/system_test.py Fri Mar  6 22:40:02 2015
@@ -156,7 +156,7 @@ def retry_exception(function, timeout=DE
             if delay is None:
                 raise
 
-def port_available(port, host='0.0.0.0'):
+def port_available(port, host='127.0.0.1'):
     """Return true if connecting to host:port gives 'connection refused'."""
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     try:
@@ -168,7 +168,7 @@ def port_available(port, host='0.0.0.0')
         pass
     return False
 
-def wait_port(port, host='0.0.0.0', **retry_kwargs):
+def wait_port(port, host='127.0.0.1', **retry_kwargs):
     """Wait up to timeout for port (on host) to be connectable.
     Takes same keyword arguments as retry to control the timeout"""
     def check(e):
@@ -296,7 +296,7 @@ class Qdrouterd(Process):
 
         DEFAULTS = {
             'listener':{'addr':'0.0.0.0', 'sasl-mechanisms':'ANONYMOUS'},
-            'connector':{'addr':'0.0.0.0', 'sasl-mechanisms':'ANONYMOUS', 'role':'on-demand'},
+            'connector':{'addr':'127.0.0.1', 'sasl-mechanisms':'ANONYMOUS', 'role':'on-demand'},
             'container':{'debugDump':"qddebug.txt"}
         }
 
@@ -376,7 +376,7 @@ class Qdrouterd(Process):
         """Return host:port for all listeners"""
         return ["%s:%s"%(l['addr'], l['port']) for l in self.config.sections('listener')]
 
-    def is_connected(self, port, host='0.0.0.0'):
+    def is_connected(self, port, host='127.0.0.1'):
         """If router has a connection to host:port return the management info.
         Otherwise return None"""
         try:

Modified: qpid/dispatch/trunk/tests/system_tests_management.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_management.py?rev=1664742&r1=1664741&r2=1664742&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_management.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_management.py Fri Mar  6 22:40:02 2015
@@ -170,7 +170,7 @@ class ManagementTest(system_test.TestCas
         attributes = {'name':'foo', 'port':str(port), 'role':'normal', 'saslMechanisms':
'ANONYMOUS'}
         entity = self.assert_create_ok(LISTENER, 'foo', attributes)
         self.assertEqual(entity['name'], 'foo')
-        self.assertEqual(entity['addr'], '0.0.0.0')
+        self.assertEqual(entity['addr'], '127.0.0.1')
 
         # Connect via the new listener
         node3 = self.cleanup(Node.connect(Url(port=port)))
@@ -264,18 +264,18 @@ class ManagementTest(system_test.TestCas
         for c in [
                 (FIXED_ADDRESS, 'a1', {'prefix':'foo', 'phase':0, 'fanout':'single', 'bias':'spread'}),
                 (FIXED_ADDRESS, 'a2', {'prefix':'foo', 'phase':1, 'fanout':'single', 'bias':'spread'}),
-                (CONNECTOR, 'wp_connector', {'port':str(wp_router.ports[0]), 'saslMechanisms':
'ANONYMOUS', 'role': 'on-demand'}),
+                (CONNECTOR, 'wp_connector', {'addr': '127.0.0.1', 'port':str(wp_router.ports[0]),
'saslMechanisms': 'ANONYMOUS', 'role': 'on-demand'}),
                 (WAYPOINT, 'wp', {'address': 'foo', 'inPhase': 0, 'outPhase': 1, 'connector':
'wp_connector'})
         ]:
             self.assert_create_ok(*c)
         assert retry(lambda: self.router.is_connected, wp_router.ports[0])
 
         # Verify the entities
-        id = 'connector/0.0.0.0:%s' % wp_router.ports[0]
+        id = 'connector/127.0.0.1:%s' % wp_router.ports[0]
         connector = self.node.read(identity=id)
         self.assertEqual(
             [connector.name, connector.addr, connector.port, connector.role],
-            ['wp_connector', '0.0.0.0', str(wp_router.ports[0]), 'on-demand'])
+            ['wp_connector', '127.0.0.1', str(wp_router.ports[0]), 'on-demand'])
 
         # Send a message through self.router, verify it goes via wp_router
         address=self.router.addresses[0]+"/foo"



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message