diff --git a/ryu/tests/integrated/common/docker_base.py b/ryu/tests/integrated/common/docker_base.py
index <HASH>..<HASH> 100644
--- a/ryu/tests/integrated/common/docker_base.py
+++ b/ryu/tests/integrated/common/docker_base.py
@@ -133,7 +133,7 @@ class Command(object):
             if out.returncode == 0:
                 return out
             LOG.error(out.stderr)
-            if try_times + 1 >= try_times:
+            if i + 1 >= try_times:
                 break
             time.sleep(interval)
         raise CommandError(out)
scenario test: Fix the wrong retry check in command execution