952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
36 lines
981 B
PHP
36 lines
981 B
PHP
<?php
|
|
/**
|
|
* test stub for testing the cacheMapOut method
|
|
*
|
|
*/
|
|
// load the namaste environment
|
|
require_once(dirname(__DIR__) . '/config/sneakerstrap.inc');
|
|
|
|
|
|
// build a broker request to fetch 10 random records
|
|
$meta = [
|
|
META_TEMPLATE => TEMPLATE_CLASS_TEST_MONGO,
|
|
META_CLIENT => CLIENT_SYSTEM,
|
|
META_CLIENT_IP => STRING_SESSION_HOME,
|
|
META_EVENT_GUID => guid(), // simulate a broker event by generating the event guid
|
|
// META_LIMIT => 10
|
|
];
|
|
|
|
$payload = [
|
|
BROKER_REQUEST => BROKER_REQUEST_FETCH,
|
|
BROKER_DATA => [ STRING_QUERY_DATA => null],
|
|
BROKER_META_DATA => $meta
|
|
];
|
|
$errors = [];
|
|
$ret = validateMetaData($payload, $errors);
|
|
$obj = new gacFactory($meta, FACTORY_EVENT_NEW_CLASS, '', $errors);
|
|
/** @var gacMongoDB $widget */
|
|
$widget = $obj->widget;
|
|
$widget->_fetchRecords([]);
|
|
if (!$widget->status)
|
|
exit(ERROR_PDO_FETCH);
|
|
if (!gasCache::mapOutboundPayload($widget, $errors))
|
|
var_export($errors);
|
|
else
|
|
var_export($widget->getCK());
|