sveneld commented on PR #3109:
URL: https://github.com/apache/thrift/pull/3109#issuecomment-2799018287

   @balping  apply this patch for test.
   
   ```
   Index: lib/php/test/Unit/Lib/Transport/TSocketTest.php
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git a/lib/php/test/Unit/Lib/Transport/TSocketTest.php 
b/lib/php/test/Unit/Lib/Transport/TSocketTest.php
   --- a/lib/php/test/Unit/Lib/Transport/TSocketTest.php        (revision 
19081602c35311ee13e6ba9ab2fa5001d182048b)
   +++ b/lib/php/test/Unit/Lib/Transport/TSocketTest.php        (revision 
b1d4b05f352ded2ba5b78cb0a4f56dde01a11d41)
   @@ -252,6 +252,7 @@
            $port = -1;
            $persist = false;
            $debugHandler = null;
   +        $handle = fopen('php://memory', 'r+');
    
            $this->getFunctionMock('Thrift\Transport', 'fsockopen')
                 ->expects($this->once())
   @@ -261,7 +262,22 @@
                     $this->anything(), #$errno,
                     $this->anything(), #$errstr,
                     $this->anything() #$this->sendTimeoutSec_ + 
($this->sendTimeoutUsec_ / 1000000),
   -             );
   +             )->willReturn($handle);
   +
   +        $this->getFunctionMock('Thrift\Transport', 'socket_import_stream')
   +            ->expects($this->once())
   +            ->with($handle)
   +            ->willReturn(true);
   +
   +        $this->getFunctionMock('Thrift\Transport', 'socket_set_option')
   +            ->expects($this->once())
   +            ->with(
   +                $this->anything(), #$socket,
   +                SOL_TCP, #$level
   +                TCP_NODELAY, #$option
   +                1 #$value
   +            )
   +            ->willReturn(true);
    
            $transport = new TSocket(
                $host,
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to