Basho\Tests\SecondaryIndexOperationsTest::testTimeoutWorks PHP Method

testTimeoutWorks() public method

public testTimeoutWorks ( )
    public function testTimeoutWorks()
    {
        $this->markTestSkipped('It is a weak test since it depends on local processing speed.');
        $builder = (new Command\Builder\QueryIndex(static::$riak))->buildBucket('Students' . static::$bucket, static::LEVELDB_BUCKET_TYPE)->withIndexName('lucky_numbers_int')->withRangeValue(0, 1000)->withTimeout(1);
        // Get first page
        $command = $builder->build();
        $response = $command->execute();
        $this->assertFalse($response->isSuccess());
        $this->assertContains($response->getCode(), ['500', '503']);
        $this->assertEquals(0, count($response->getResults()));
        $this->assertNull($response->getContinuation());
        $this->assertTrue($response->isDone());
    }