diff --git a/test/lib/tarantool_server.py b/test/lib/tarantool_server.py
index 2e1d75942aeaeed55564b5a3caec603b76d98cd1..a8b06db74e8297c14f0e0ad3da2fb6e5213931f4 100644
--- a/test/lib/tarantool_server.py
+++ b/test/lib/tarantool_server.py
@@ -438,7 +438,7 @@ class TarantoolServer(Server):
             time.sleep(0.001)
 
         is_connected = False
-        while not is_connected:
+        while not is_connected and not self.gdb:
             try:
                 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                 sock.connect(("localhost", self.port))