4089 Dyre Tjeldvoll 2012-10-05
Fixing failing backend unit test
modified:
storage/ndb/mcc/tst/tst_main.py
4088 Dyre Tjeldvoll 2012-10-05
Disable host_info for MacOS
modified:
storage/ndb/mcc/host_info/CMakeLists.txt
=== modified file 'storage/ndb/mcc/tst/tst_main.py'
--- a/storage/ndb/mcc/tst/tst_main.py 2012-10-03 19:37:27 +0000
+++ b/storage/ndb/mcc/tst/tst_main.py 2012-10-05 12:49:17 +0000
@@ -50,7 +50,7 @@ from util import mock_msg, is_set
from clusterhost import ABClusterHost, produce_ABClusterHost, LocalClusterHost
# Default tst configuration. Can be overridden in config.json
-_cfg = { 'debuglevel': None, 'username': None, 'password': None, 'host_list': ['localhost'] }
+_cfg = { 'debuglevel': None, 'username': None, 'password': None, 'host_list': [{'name': 'localhost'}] }
_cfg_loaded = False
def cfg():
@@ -72,6 +72,9 @@ def cfg():
print '_cfg='+str(_cfg)
return _cfg
+def host_names():
+ return [ hd['name'] for hd in cfg()['host_list'] ]
+
request_handler.configdir = '..'
def_datadir = os.path.join(os.path.expanduser('~'), 'MySQL_Cluster', 'data')
@@ -95,9 +98,6 @@ WINDOWS_HOST = {'name' : 'tyr04.no.oracl
'hostInfoRep': { 'host': { 'name' : 'tyr04.no.oracle.com' },
'hostRes' : {'ram' : 8190, 'cores' : 8, 'uname': 'CYGWIN' }}}
-#HOST_A = 'siv27.no.oracle.com'
-#HOST_B = 'siv28.no.oracle.com'
-
def mock_produce_ABClusterHost(hostname='localhost'):
return produce_ABClusterHost(hostname=hostname)
@@ -122,10 +122,9 @@ class Test00Utils(utmod.TestCase):
def test_host_is_unreachable(self):
self.assertTrue(host_is_unreachable('some_non_existent_host_name'))
- @utmod.skipIf(not cfg().has_key('host_list'), 'No host list')
def test_host_is_unreachable(self):
- for h in cfg()['host_list']:
- self.assertFalse(host_is_unreachable(h['name']))
+ for h in host_names():
+ self.assertFalse(host_is_unreachable(h))
class Test0ConfigIni(utmod.TestCase):
def setUp(self):
@@ -272,11 +271,10 @@ class Test3Ports(utmod.TestCase):
self.assertRaises(util.NoPortAvailableException,
util.first_available_port, cfg()['linux_host']['name'], 22, 22)
-@stripped(not cfg().has_key('host_list'), 'No host list')
class Test4ABClusterHost(utmod.TestCase):
def setUp(self):
self.ch = None
- self.chlst = map(mock_produce_ABClusterHost, cfg()['host_list'])
+ self.chlst = map(mock_produce_ABClusterHost, host_names())
def tearDown(self):
if self.ch != None:
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster-7.2 branch (Dyre.Tjeldvoll:4088 to 4089) | Dyre Tjeldvoll | 5 Oct |