From 4d72cc98a3d63f2e7263287fa4b3ed67a1d731b6 Mon Sep 17 00:00:00 2001 From: Yaroslav Dynnikov <yaroslav.dynnikov@gmail.com> Date: Mon, 30 May 2022 16:04:30 +0300 Subject: [PATCH] test: rename a method for better readability --- test/int/conftest.py | 6 +++--- test/int/test_joining.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/int/conftest.py b/test/int/conftest.py index cf79d5f551..890202a2f5 100644 --- a/test/int/conftest.py +++ b/test/int/conftest.py @@ -161,7 +161,7 @@ class Instance: return f"Instance({self.instance_id}, listen={self.listen})" @contextmanager - def connection(self, timeout: int): + def connect(self, timeout: int): c = Connection( self.host, self.port, @@ -175,12 +175,12 @@ class Instance: @normalize_net_box_result def call(self, fn, *args, timeout: int = 1): - with self.connection(timeout) as conn: + with self.connect(timeout) as conn: return conn.call(fn, args) @normalize_net_box_result def eval(self, expr, *args, timeout: int = 1): - with self.connection(timeout) as conn: + with self.connect(timeout) as conn: return conn.eval(expr, *args) def kill(self): diff --git a/test/int/test_joining.py b/test/int/test_joining.py index e85fe92429..914b9d7d3f 100644 --- a/test/int/test_joining.py +++ b/test/int/test_joining.py @@ -162,7 +162,7 @@ def test_replication(cluster2: Cluster): assert i1.replicaset_uuid() == i2.replicaset_uuid() for instance in cluster2.instances: - with instance.connection(1) as conn: + with instance.connect(1) as conn: raft_peer = conn.select("raft_group", [instance.raft_id])[0] space_cluster = conn.select("_cluster") cfg_replication = conn.eval("return box.cfg.replication") -- GitLab