Esempio n. 1
0
 def test_open_many_transactions_in_parallel(self):
     self.txs_closed = 0
     with GraknClient.core() as client, client.session(
             "grakn", SessionType.DATA) as session:
         pool = ThreadPool(8)
         results = [None for _ in range(10)]
         pool.map(partial(self.open_tx, session), results)
         pool.close()
         pool.join()
Esempio n. 2
0
 def setUp(self):
     with GraknClient.core() as client:
         if not client.databases().contains("grakn"):
             client.databases().create("grakn")
Esempio n. 3
0
def before_all(context: Context):
    environment_base.before_all(context)
    context.client = GraknClient.core()
Esempio n. 4
0
 def setUpClass(cls):
     super(TestClientPython, cls).setUpClass()
     global client
     client = GraknClient.core()
Esempio n. 5
0
 def setUp(self):
     with GraknClient.core() as client:
         if "grakn" not in client.databases().all():
             client.databases().create("grakn")
Esempio n. 6
0
def before_all(context: Context):
    context.THREAD_POOL_SIZE = 32
    context.client = GraknClient.core()
Esempio n. 7
0
def before_all(context: Context):
    environment_base.before_all(context)
    context.client = GraknClient.core(address="localhost:%d" %
                                      int(context.config.userdata["port"]))