Commit 5300d582 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e2a713b7
...@@ -230,7 +230,7 @@ class NEOCluster(object): ...@@ -230,7 +230,7 @@ class NEOCluster(object):
cleanup_on_delete=False, temp_dir=None, clear_databases=True, cleanup_on_delete=False, temp_dir=None, clear_databases=True,
adapter=os.getenv('NEO_TESTS_ADAPTER'), adapter=os.getenv('NEO_TESTS_ADAPTER'),
address_type=ADDRESS_TYPE, bind_ip=None, logger=True, address_type=ADDRESS_TYPE, bind_ip=None, logger=True,
importer=None): importer=None, upstream_masters=None, upstream_cluster=None):
if not adapter: if not adapter:
adapter = 'MySQL' adapter = 'MySQL'
self.adapter = adapter self.adapter = adapter
...@@ -287,9 +287,14 @@ class NEOCluster(object): ...@@ -287,9 +287,14 @@ class NEOCluster(object):
# create admin node # create admin node
self._newProcess(NodeTypes.ADMIN, logger and 'admin', admin_port) self._newProcess(NodeTypes.ADMIN, logger and 'admin', admin_port)
# create master nodes # create master nodes
Mkw = {}
if upstream_masters is not None:
Mkw['upstream-masters'] = upstream_masters
if upstream_cluster is not None:
Mkw['upstream-cluster'] = upstream_cluster
for i, port in enumerate(master_node_list): for i, port in enumerate(master_node_list):
self._newProcess(NodeTypes.MASTER, logger and 'master_%u' % i, self._newProcess(NodeTypes.MASTER, logger and 'master_%u' % i,
port, partitions=partitions, replicas=replicas) port, partitions=partitions, replicas=replicas, **Mkw)
# create storage nodes # create storage nodes
for i, db in enumerate(db_list): for i, db in enumerate(db_list):
self._newProcess(NodeTypes.STORAGE, logger and 'storage_%u' % i, self._newProcess(NodeTypes.STORAGE, logger and 'storage_%u' % i,
......
#!/bin/sh -xe #!/bin/sh -xe
N1M=`neoctl -a 127.0.0.1:5551 print node |grep MASTER |awk '{print $5}'`
NEO_ADMIN_PORT=5552 \ NEO_ADMIN_PORT=5552 \
neosimple --adapter=SQLite --temp_dir=tmp/2 --logger --name neo2 s1 neosimple --adapter=SQLite --temp_dir=tmp/2 --logger --name neo2 --upstream_masters $N1M --upstream_cluster neo1 s1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment