From 70aae8fec093669874a65f3f2be4789aaac6518a Mon Sep 17 00:00:00 2001
From: Eugine Blikh <bigbes@gmail.com>
Date: Wed, 4 Dec 2013 20:42:51 +0400
Subject: [PATCH] Fix for #146 and #150. closing socket and entangled variables

---
 test/box/socket.result  | 5 ++++-
 test/box/socket.test.py | 5 ++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/box/socket.result b/test/box/socket.result
index d9ac4726a5..64bf023cf1 100644
--- a/test/box/socket.result
+++ b/test/box/socket.result
@@ -936,7 +936,7 @@ iotest()
 ---
 - 12
 ...
-wait_cout = 100 while replies ~= 3 and wait_cout > 0 do box.fiber.sleep(0.001) wait_cout = wait_cout - 1 end
+wait_cout = 100 while reps ~= 3 and wait_cout > 0 do box.fiber.sleep(0.001) wait_cout = wait_cout - 1 end
 ---
 ...
 reps
@@ -955,3 +955,6 @@ wait_cout = 100 while not test_listen_done and wait_cout > 0 do box.fiber.sleep(
 Hello world
 Hello world
 Hello world
+ms:close()
+---
+...
diff --git a/test/box/socket.test.py b/test/box/socket.test.py
index 06da97944b..3bd4e423cb 100644
--- a/test/box/socket.test.py
+++ b/test/box/socket.test.py
@@ -40,7 +40,6 @@ admin("s:connect('127.0.0.1', '30303')")
 admin("s:error()")
 
 admin("s:connect('127.0.0.1', '30303', 0.01)")
-
 # connection refused
 admin("s:error()")
 
@@ -563,7 +562,7 @@ admin("iotest()")
 admin("iotest()")
 admin("iotest()")
 # Due to delays in event loop the value can be not updated
-admin("wait_cout = 100 while replies ~= 3 and wait_cout > 0 do box.fiber.sleep(0.001) wait_cout = wait_cout - 1 end")
+admin("wait_cout = 100 while reps ~= 3 and wait_cout > 0 do box.fiber.sleep(0.001) wait_cout = wait_cout - 1 end")
 admin("reps")
 
 # Bug #43: incorrect box:shutdown() arg handling
@@ -588,7 +587,6 @@ end
 
 box.fiber.wrap(server)
 """
-
 admin("test_listen_done = false")
 admin(test.replace('\n', ' '))
 # Due to delays in event loop the value can be not updated
@@ -612,3 +610,4 @@ s.connect(('127.0.0.1', 8181))
 data = s.recv(1024)
 s.close()
 print data
+admin("ms:close()")
-- 
GitLab