Skip to content

Commit

Permalink
Speed up ext/dba/tests/bug78808.phpt
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmb69 committed May 28, 2021
1 parent f3d1e9e commit c11b52d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/dba/tests/bug78808.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
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';
?>
--FILE--
<?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";
Expand Down

0 comments on commit c11b52d

Please sign in to comment.