Speed up ext/dba/tests/bug78808.phpt

This tests takes about 2 minutes on AppVeyor CI, what is super slow.
The problem is that we're doing 50,000 inserts of small keys and values
instead of only few inserts with large values, what basically has the
same effect regarding the mmap size.

Closes GH-7073.
This commit is contained in:
Christoph M. Becker 2021-05-28 18:49:03 +02:00
parent f3d1e9ed06
commit c11b52de95
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6

View File

@ -2,7 +2,6 @@
Bug #78808 ([LMDB] MDB_MAP_FULL: Environment mapsize limit reached)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
$handler = 'lmdb';
require_once __DIR__ .'/skipif.inc';
?>
@ -10,9 +9,10 @@ require_once __DIR__ .'/skipif.inc';
<?php
$handler = 'lmdb';
require_once __DIR__ .'/test.inc';
$value = str_repeat('*', 0x100000);
$lmdb_h = dba_open($db_filename, 'c', 'lmdb', 0644, 5*1048576);
for ($i = 0; $i < 50000; $i++) {
dba_insert('key' . $i, 'value '. $i, $lmdb_h);
for ($i = 0; $i < 3; $i++) {
dba_insert('key' . $i, $value, $lmdb_h);
}
dba_close($lmdb_h);
echo "done\n";