Skip to content

Commit c11b52d

Browse files
committed
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.
1 parent f3d1e9e commit c11b52d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/dba/tests/bug78808.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
Bug #78808 ([LMDB] MDB_MAP_FULL: Environment mapsize limit reached)
33
--SKIPIF--
44
<?php
5-
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
65
$handler = 'lmdb';
76
require_once __DIR__ .'/skipif.inc';
87
?>
98
--FILE--
109
<?php
1110
$handler = 'lmdb';
1211
require_once __DIR__ .'/test.inc';
12+
$value = str_repeat('*', 0x100000);
1313
$lmdb_h = dba_open($db_filename, 'c', 'lmdb', 0644, 5*1048576);
14-
for ($i = 0; $i < 50000; $i++) {
15-
dba_insert('key' . $i, 'value '. $i, $lmdb_h);
14+
for ($i = 0; $i < 3; $i++) {
15+
dba_insert('key' . $i, $value, $lmdb_h);
1616
}
1717
dba_close($lmdb_h);
1818
echo "done\n";

0 commit comments

Comments
 (0)