diff --git a/test/box/gh-3633-tuple-size-increasing.result b/test/box/gh-3633-tuple-size-increasing.result index c9a51b4d35083113878011f9f3431f1e0b168036..934849be88119eb152e3f084868aaa570df58278 100644 --- a/test/box/gh-3633-tuple-size-increasing.result +++ b/test/box/gh-3633-tuple-size-increasing.result @@ -47,7 +47,7 @@ str = digest.urandom(size) | --- | ... -- insert tuples, until we get error due to no enough of memory -for i = 1, 1024 do s:insert({i, str}) end +for i = 1, 1049 do s:insert({i, str}) end | --- | - error: Failed to allocate 512019 bytes in slab allocator for memtx_tuple | ... diff --git a/test/box/gh-3633-tuple-size-increasing.test.lua b/test/box/gh-3633-tuple-size-increasing.test.lua index adad7169fcbc6fcc9a8f9e4e5926dd7aaee9da2a..7f6069fa18f9edcc8b0cccd708d065109556a6da 100644 --- a/test/box/gh-3633-tuple-size-increasing.test.lua +++ b/test/box/gh-3633-tuple-size-increasing.test.lua @@ -17,7 +17,7 @@ test_run:cmd("setopt delimiter ''"); size = 500 * 1024 str = digest.urandom(size) -- insert tuples, until we get error due to no enough of memory -for i = 1, 1024 do s:insert({i, str}) end +for i = 1, 1049 do s:insert({i, str}) end -- truncate space, and collect garbage (free previous allocated memory) s:truncate() collectgarbage('collect') diff --git a/test/box/reconfigure.result b/test/box/reconfigure.result index 021ed8fc0f4fc3448645a2c91729fb99db2aaa45..3a1b86700cbf9017adf6a9210d33c5410282a3bd 100644 --- a/test/box/reconfigure.result +++ b/test/box/reconfigure.result @@ -148,15 +148,15 @@ s = box.schema.space.create('test') _ = s:create_index('pk') --- ... -count = 200 +count = 1000 --- ... pad = string.rep('x', 100 * 1024) --- ... -for i = 1, count do s:replace{i, pad} end -- error: not enough memory +for i = 1, count do s:replace{i + 1000, pad} end -- error: not enough memory --- -- error: Failed to allocate 102418 bytes in slab allocator for memtx_tuple +- error: Failed to allocate 102419 bytes in slab allocator for memtx_tuple ... s:count() < count --- @@ -169,7 +169,10 @@ box.slab.info().quota_size --- - 83886080 ... -for i = s:count() + 1, count do s:replace{i, pad} end -- ok +count = s:count() + 100 +--- +... +for i = s:count() + 1, count do s:replace{i + 1000, pad} end -- ok --- ... s:count() == count diff --git a/test/box/reconfigure.test.lua b/test/box/reconfigure.test.lua index 40fbecf8fbe0ed989bd4a3114dbc00ec8d2351a5..a82cfa02399d1d8cfb4d8dbb0768ff044e8d5d60 100644 --- a/test/box/reconfigure.test.lua +++ b/test/box/reconfigure.test.lua @@ -61,15 +61,16 @@ box.slab.info().quota_size s = box.schema.space.create('test') _ = s:create_index('pk') -count = 200 +count = 1000 pad = string.rep('x', 100 * 1024) -for i = 1, count do s:replace{i, pad} end -- error: not enough memory +for i = 1, count do s:replace{i + 1000, pad} end -- error: not enough memory s:count() < count box.cfg{memtx_memory = 80 * 1024 * 1024} box.slab.info().quota_size -for i = s:count() + 1, count do s:replace{i, pad} end -- ok +count = s:count() + 100 +for i = s:count() + 1, count do s:replace{i + 1000, pad} end -- ok s:count() == count s:drop() diff --git a/test/wal_off/oom.result b/test/wal_off/oom.result index 623809fb2e5f09dd23494c83b9e04ef648c4b793..539f8ec975ade752c125ca7cf90a22e6567a833c 100644 --- a/test/wal_off/oom.result +++ b/test/wal_off/oom.result @@ -252,7 +252,7 @@ collectgarbage('collect') --- - 0 ... -for i=1,10000 do space:insert{i, str} end +for i=1,10492 do space:insert{i, str} end --- - error: Failed to allocate <NUM> bytes in slab allocator for memtx_tuple ... @@ -277,7 +277,7 @@ collectgarbage('collect') --- - 0 ... -for i=1,10000 do space:insert{i, str} end +for i=1,10492 do space:insert{i, str} end --- - error: Failed to allocate <NUM> bytes in slab allocator for memtx_tuple ... diff --git a/test/wal_off/oom.test.lua b/test/wal_off/oom.test.lua index 6b3cf2c65a0f1bab07a6fc16e916b7e90231d272..3c1b897d2b2b4ca9eacfbe1e842dde278f3f5f9c 100644 --- a/test/wal_off/oom.test.lua +++ b/test/wal_off/oom.test.lua @@ -91,7 +91,7 @@ space = box.schema.space.create('tweedledum') index = space:create_index('primary', { type = 'hash' }) collectgarbage('collect') -for i=1,10000 do space:insert{i, str} end +for i=1,10492 do space:insert{i, str} end definitely_used = index:count() * 16 * 1024 2 * definitely_used > arena_bytes -- at least half memory used to_del = index:count() @@ -99,7 +99,7 @@ for i=1,to_del do space:delete{i} end index:count() collectgarbage('collect') -for i=1,10000 do space:insert{i, str} end +for i=1,10492 do space:insert{i, str} end definitely_used = index:count() * 16 * 1024 2 * definitely_used > arena_bytes -- at least half memory used space:truncate()