Skip to content
Snippets Groups Projects
Commit efacd9e4 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

gh-1735 review fixes: reduce sleep times in cycles

parent cd39c69f
No related branches found
No related tags found
No related merge requests found
......@@ -1293,7 +1293,7 @@ server ~= nil
---
- true
...
fiber.sleep(.5)
fiber.sleep(.1)
---
...
client = socket.tcp_connect('unix/', path)
......@@ -1353,7 +1353,7 @@ addr.family == addr2.family
---
- true
...
fiber.sleep(.5)
fiber.sleep(.1)
---
...
client = socket.tcp_connect(addr2.host, addr2.port)
......
......@@ -426,7 +426,7 @@ os.remove(path)
server, addr = socket.tcp_server('unix/', path, function(s) s:write('Hello, world') end)
type(addr)
server ~= nil
fiber.sleep(.5)
fiber.sleep(.1)
client = socket.tcp_connect('unix/', path)
client ~= nil
client:read(123)
......@@ -446,7 +446,7 @@ server ~= nil
addr2 = server:name()
addr.host == addr2.host
addr.family == addr2.family
fiber.sleep(.5)
fiber.sleep(.1)
client = socket.tcp_connect(addr2.host, addr2.port)
client ~= nil
-- Check that listen and client fibers have appropriate names
......
......@@ -12,7 +12,7 @@ local f = require('fiber').create(
)
---
...
require('fiber').sleep(0.1)
require('fiber').sleep(0.01)
---
...
Check log line (Hello):
......
......@@ -15,7 +15,7 @@ admin("""local f = require('fiber').create(
io.flush()
end
)""")
admin("require('fiber').sleep(0.1)")
admin("require('fiber').sleep(0.01)")
print("Check log line (Hello):")
print('---')
......
......@@ -68,7 +68,7 @@ MAX_ITERATIONS = 100
while not os.access(snapshot, os.F_OK) and iteration < MAX_ITERATIONS:
if iteration % 10 == 0:
os.kill(pid, SIGUSR1)
time.sleep(0.1)
time.sleep(0.01)
iteration = iteration + 1
if iteration == 0 or iteration >= MAX_ITERATIONS:
......
......@@ -1044,7 +1044,7 @@ c = net:new(box.cfg.listen, options)
f = fiber.create(function() c:call("") end)
---
...
fiber.sleep(0.1)
fiber.sleep(0.01)
---
...
f:cancel(); c:close()
......
......@@ -417,7 +417,7 @@ c:close()
options = {user = 'netbox', password = 'badpass', wait_connected = false, reconnect_after = 0.01}
c = net:new(box.cfg.listen, options)
f = fiber.create(function() c:call("") end)
fiber.sleep(0.1)
fiber.sleep(0.01)
f:cancel(); c:close()
-- check for on_schema_reload callback
......
......@@ -49,7 +49,7 @@ while vyinfo().range_count < range_count do
iter = iter + 1
for k = key_count,1,-1 do s:replace(gen_tuple(k)) end
box.snapshot()
fiber.sleep(0.1)
fiber.sleep(0.01)
end;
---
...
......@@ -80,7 +80,7 @@ test_run:cmd("setopt delimiter ''");
- true
...
-- Wait until compaction is over (ranges being compacted can't be coalesced)
while vyinfo().range_count ~= vyinfo().run_count do fiber.sleep(0.1) end
while vyinfo().range_count ~= vyinfo().run_count do fiber.sleep(0.01) end
---
...
-- Trigger range coalescing by calling snapshot.
......@@ -88,7 +88,7 @@ s:replace(gen_tuple(math.random(1, key_count))) box.snapshot()
---
...
-- Wait until adjacent ranges are coalesced
while vyinfo().range_count > 1 do fiber.sleep(0.1) end
while vyinfo().range_count > 1 do fiber.sleep(0.01) end
---
...
vyinfo().range_count
......
......@@ -28,7 +28,7 @@ while vyinfo().range_count < range_count do
iter = iter + 1
for k = key_count,1,-1 do s:replace(gen_tuple(k)) end
box.snapshot()
fiber.sleep(0.1)
fiber.sleep(0.01)
end;
test_run:cmd("setopt delimiter ''");
......@@ -46,13 +46,13 @@ end;
test_run:cmd("setopt delimiter ''");
-- Wait until compaction is over (ranges being compacted can't be coalesced)
while vyinfo().range_count ~= vyinfo().run_count do fiber.sleep(0.1) end
while vyinfo().range_count ~= vyinfo().run_count do fiber.sleep(0.01) end
-- Trigger range coalescing by calling snapshot.
s:replace(gen_tuple(math.random(1, key_count))) box.snapshot()
-- Wait until adjacent ranges are coalesced
while vyinfo().range_count > 1 do fiber.sleep(0.1) end
while vyinfo().range_count > 1 do fiber.sleep(0.01) end
vyinfo().range_count
......
......@@ -281,7 +281,7 @@ end;
...
function wait()
while (not snaps_done) do
fiber.sleep(0.1)
fiber.sleep(0.01)
end
end;
---
......
......@@ -170,7 +170,7 @@ end;
function wait()
while (not snaps_done) do
fiber.sleep(0.1)
fiber.sleep(0.01)
end
end;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment