public static function setUpBeforeClass() { parent::setUpBeforeClass(); // make completely random key/bucket based on time static::$key = md5(rand(0, 99) . time()); static::$bucket = md5(rand(0, 99) . time()); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); foreach (static::$mr_content as $key => $value) { $command = (new Command\Builder\StoreObject(static::$riak))->buildObject($value)->buildLocation($key, 'phptest_mr')->build(); $command->execute(); } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); $response = (new Command\Builder\Search\FetchIndex(static::$riak))->withName(static::INDEX)->build()->execute(); if ($response->getCode() == '200') { (new Command\Builder\Search\DissociateIndex(static::$riak))->buildBucket('sabres', self::SEARCH_BUCKET_TYPE)->build()->execute(); (new Command\Builder\Search\DeleteIndex(static::$riak))->withName(static::INDEX)->build()->execute(); } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); static::populateKey(); try { $response = (new Command\Builder\TimeSeries\DescribeTable(static::$riak))->withTable(static::$table)->build()->execute(); } catch (\Basho\Riak\Exception $e) { $command = (new Command\Builder\TimeSeries\Query(static::$riak))->withQuery(static::tableDefinition())->build()->execute(); } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); try { $command = (new Command\Builder\FetchBucketProperties(static::$riak))->buildBucket('test', static::HLL_BUCKET_TYPE)->build(); $response = $command->execute(); if ($response->isSuccess() && $response->getCode() == 200) { static::$hll_present = true; } } catch (\Exception $ex) { static::$hll_present = false; } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); // make completely random key based on time static::$key = md5(rand(0, 99) . time()); try { // Skip this suite if the "hlls" bucket type is not present $command = (new Command\Builder\FetchBucketProperties(static::$riak))->buildBucket('test', static::HLL_BUCKET_TYPE)->build(); $response = $command->execute(); if (!$response->isSuccess() || $response->getCode() != 200) { throw new \PHPUnit_Framework_SkippedTestSuiteError("hlls bucket type is not enabled and activated, skipping"); } } catch (\Exception $ex) { throw new \PHPUnit_Framework_SkippedTestSuiteError("hlls bucket type is not enabled and activated, skipping"); } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); shell_exec('sudo riak-admin security enable'); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); static::populateKey(); }