Exemplo n.º 1
0
 /**
  * @expectedException Kafka_Exception_Socket_Timeout
  */
 public function testWriteTimeout()
 {
     $this->markTestSkipped('find a better way of testing socket timeouts');
     $stream = fopen('php://temp', 'w+b');
     $socket = new Kafka_Socket('localhost', 0, 0, 0, -1, -1);
     $socket->setStream($stream);
     $socket->write('short timeout');
     //$socket->rewind();
     //var_dump($socket->read(4));
     $this->fail('The above write() call should fail on a socket with timeout = -1');
 }