зеркало из https://github.com/github/vitess-gh.git
Fix issue with bad dns zookeeper test
* I think this test was passing by luck because we didn't have any real
operations that interacted with that cell. Given the global topology refactor
part of this PR, this has changed and now this breaks.
* I think the regression happened when samuel/go-zookeeper was introduced, but
this was never discovered. This test was originally introduced in:
c685aaf243
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
This commit is contained in:
Родитель
7092679c93
Коммит
a8dd181065
|
@ -512,7 +512,7 @@ func (ts *Server) FindAllTabletAliasesInShardByCell(ctx context.Context, keyspac
|
|||
ctx = trace.NewContext(ctx, span)
|
||||
var err error
|
||||
|
||||
// The caller intents to update all cells in this case
|
||||
// The caller intents to all cells
|
||||
if len(cells) == 0 {
|
||||
cells, err = ts.GetCellInfoNames(ctx)
|
||||
if err != nil {
|
||||
|
|
|
@ -46,12 +46,7 @@ healthy_expr = re.compile(r'Current status: <span.+?>healthy')
|
|||
def setUpModule():
|
||||
try:
|
||||
topo_flavor = environment.topo_server().flavor()
|
||||
if topo_flavor == 'zk2':
|
||||
# This is a one-off test to make sure our 'zk2' implementation
|
||||
# behave with a server that is not DNS-resolveable.
|
||||
environment.topo_server().setup(add_bad_host=True)
|
||||
else:
|
||||
environment.topo_server().setup()
|
||||
environment.topo_server().setup()
|
||||
|
||||
# start mysql instance external to the test
|
||||
setup_procs = [
|
||||
|
|
|
@ -56,12 +56,7 @@ class TestServiceTestOfTabletManager(unittest.TestCase):
|
|||
|
||||
try:
|
||||
topo_flavor = environment.topo_server().flavor()
|
||||
if topo_flavor == 'zk2':
|
||||
# This is a one-off test to make sure our 'zk2' implementation
|
||||
# behave with a server that is not DNS-resolveable.
|
||||
environment.topo_server().setup(add_bad_host=True)
|
||||
else:
|
||||
environment.topo_server().setup()
|
||||
environment.topo_server().setup()
|
||||
|
||||
# start mysql instance external to the test
|
||||
setup_procs = [
|
||||
|
|
|
@ -40,7 +40,7 @@ class Zk2TopoServer(server.TopoServer):
|
|||
self.addr = 'localhost:%d' % (self.zk_port_base + 2)
|
||||
self.ports_assigned = True
|
||||
|
||||
def setup(self, add_bad_host=False):
|
||||
def setup(self):
|
||||
from environment import run, binary_args, vtlogroot # pylint: disable=g-import-not-at-top,g-multiple-import
|
||||
import utils # pylint: disable=g-import-not-at-top
|
||||
|
||||
|
@ -60,8 +60,6 @@ class Zk2TopoServer(server.TopoServer):
|
|||
'-server_address', self.addr,
|
||||
'test_ny'])
|
||||
ca_addr = self.addr
|
||||
if add_bad_host:
|
||||
ca_addr += ',does.not.exists:1234'
|
||||
# Use UpdateCellInfo for this one, more coverage.
|
||||
utils.run_vtctl_vtctl(['UpdateCellInfo',
|
||||
'-root', '/test_ca',
|
||||
|
|
Загрузка…
Ссылка в новой задаче