Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F632161
readpreference-getMaxStalenessMS-001.phpt
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
607 B
Referenced Files
None
Subscribers
None
readpreference-getMaxStalenessMS-001.phpt
View Options
--TEST--
MongoDB\Driver\ReadPreference::getMaxStalenessSeconds()
--FILE--
<?php
require_once __DIR__ . '/../utils/tools.php';
$tests = [
MongoDB\Driver\ReadPreference::NO_MAX_STALENESS,
MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS,
90,
1000,
2147483647,
];
foreach ($tests as $test) {
$rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => $test]);
var_dump($rp->getMaxStalenessSeconds());
}
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
int(-1)
int(90)
int(90)
int(1000)
int(2147483647)
===DONE===
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 1:41 PM (18 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152377
Default Alt Text
readpreference-getMaxStalenessMS-001.phpt (607 B)
Attached To
Mode
R114 php-mongodb
Attached
Detach File
Event Timeline