diff --git a/test/wal_off/oom.result b/test/wal_off/oom.result index c629d4662349dc51444cbac6de7bf947fcb6f021..fa357432069c848967894e6ab0bef8d39c5986a9 100644 --- a/test/wal_off/oom.result +++ b/test/wal_off/oom.result @@ -218,6 +218,10 @@ space = box.schema.space.create('tweedledum') index = space:create_index('primary', { type = 'hash' }) --- ... +collectgarbage('collect') +--- +- 0 +... for i=1,10000 do space:insert{i, str} end --- - error: Failed to allocate 15019 bytes in slab allocator for tuple @@ -239,6 +243,10 @@ index:count() --- - 0 ... +collectgarbage('collect') +--- +- 0 +... for i=1,10000 do space:insert{i, str} end --- - error: Failed to allocate 15019 bytes in slab allocator for tuple diff --git a/test/wal_off/oom.test.lua b/test/wal_off/oom.test.lua index 2ebdf96f816cec4bb81136a522dbeaad4901ee6e..88a1f0fb4e32622ca5c9323ce89c44877df06488 100644 --- a/test/wal_off/oom.test.lua +++ b/test/wal_off/oom.test.lua @@ -85,6 +85,7 @@ str = string.rep('a', 15000) -- about size of index memory block 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 definatelly_used = index:count() * 16 * 1024 2 * definatelly_used > arena_bytes -- at least half memory used @@ -92,6 +93,7 @@ to_del = index:count() for i=1,to_del do space:delete{i} end index:count() +collectgarbage('collect') for i=1,10000 do space:insert{i, str} end definatelly_used = index:count() * 16 * 1024 2 * definatelly_used > arena_bytes -- at least half memory used