MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / __init__

Method __init__

tests/flow/test_constraint.py:970–988  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

968
969class testConstraintReplication():
970 def __init__(self):
971 self.env = Env(decodeResponses=True, env='oss', useSlaves=True)
972 self.source = self.env.getConnection()
973 self.replica = self.env.getSlaveConnection()
974 self.monitor = []
975 self.g = Graph(self.source, GRAPH_ID)
976
977 self.monitor_thread = threading.Thread(target=self.monitor_thread)
978 self.monitor_thread.start()
979
980 # wait for monitor thread to attach
981 while MONITOR_ATTACHED is False:
982 time.sleep(0.2)
983
984 # clear DB
985 self.source.flushall()
986
987 # the WAIT command forces master slave sync to complete
988 self.source.execute_command("WAIT", 1, 0)
989
990 def monitor_thread(self):
991 global MONITOR_ATTACHED

Callers

nothing calls this directly

Calls 2

GraphClass · 0.85
startMethod · 0.80

Tested by

no test coverage detected