Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3212

Fix make cross support for php TJSONProtocol

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.9.2
    • None
    • PHP - Library, Test Suite
    • None

    Description

      After making changes to support json protocol for the php client in make cross I found that it fails:

      $ /usr/bin/python test/test.py -s --server cpp,,,,,,,,php,, --client ,,,,,,,,php,,
      Apache Thrift - Integration Test Suite
      Mon Jun 29 17:24:49 2015
      ======================================================================
      server-client:     protocol:    transport:               result:
      cpp-php            binary       buffered-ip              success(0)
      cpp-php            compact      buffered-ip              success(0)
      cpp-php            compact      framed-ip                success(0)
      cpp-php            json         framed-ip                failure(255)
      cpp-php            json         buffered-ip              failure(255)
      ======================================================================
      *** Following 2 failures were unexpected ***:
      If it is introduced by you, please fix it before submitting the code.
      ======================================================================
      server-client:     protocol:    transport:               result:
      cpp-php            json         framed-ip                failure(255)
      cpp-php            json         buffered-ip              failure(255)
      ======================================================================
      Unexpected failures are logged to test/log/unexpected_failures.log
      

      In the php client log it says:

      Mon Jun 29 17:24:51 2015
      Executing: php TestClient.php --protocol=json --transport=buffered --port=53492
      Directory: /home/jking/thrift/test/php
      config:delay: 2
      config:timeout: 6
      ======================================================================
      testVoid() = void
      testString("Test") = "Test"
      testByte(1) = 1
      testI32(-1) = -1
      testI64(-34359738368) = -34359738368
      testDouble(-852.234234234) = -852.234234234
      testStruct({"Zero", 1, -3, -5}) = {"Zero", 1, -3, -5}
      testNest({1, {"Zero", 1, -3, -5}), 5} = {1, {"Zero", 1, -3, -5}, 5}
      testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}
      testSet({-2, -1, 0, 1, 2}) = {1, 1, 1, 1, 1}
      testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2}
      testEnum(ONE) = 1
      testEnum(TWO) = 2
      testEnum(THREE) = 3
      testEnum(FIVE) = 5
      testEnum(EIGHT) = 8
      testTypedef(309858235082523) = 309858235082523
      testMapMap(1) = {-4 => {-4 => -4, -3 => -3, -2 => -2, -1 => -1, }, 4 => {1 => 1, 2 => 2, 3 => 3, 4 => 4, }, }
      testInsanity() = {1 => {2 => {{5 => 5, 8 => 8, }, {{"Goodbye4", 4, 4, 4}, {"Hello2", 2, 2, 2}, }}, 3 => {{5 => 5, 8 => 8, }, {{"Goodbye4", 4, 4, 4}, {"Hello2", 2, 2, 2}, }}, }, 2 => {6 => {{}, {}}, }, }
      testException('Xception') caught xception 1001: Xception
      Total time: 228 ms
      PHP Fatal error:  Uncaught exception 'Thrift\Exception\TTransportException' with message 'TSocket read 0 bytes' in /home/jking/thrift/lib/php/lib/Thrift/Transport/TSocket.php:278
      Stack trace:
      #0 /home/jking/thrift/lib/php/lib/Thrift/Transport/TTransport.php(75): Thrift\Transport\TSocket->read(1)
      #1 /home/jking/thrift/lib/php/lib/Thrift/Transport/TBufferedTransport.php(118): Thrift\Transport\TTransport->readAll(1)
      #2 /home/jking/thrift/lib/php/lib/Thrift/Protocol/JSON/LookaheadReader.php(41): Thrift\Transport\TBufferedTransport->readAll(1)
      #3 /home/jking/thrift/lib/php/lib/Thrift/Protocol/TJSONProtocol.php(193): Thrift\Protocol\JSON\LookaheadReader->read()
      #4 /home/jking/thrift/lib/php/lib/Thrift/Protocol/TJSONProtocol.php(466): Thrift\Protocol\TJSONProtocol->readJSONSyntaxChar('[')
      #5 /home/jking/thrift/lib/php/lib/Thrift/Protocol/TJSONProtocol.php(622): Thrift\Protocol\TJSONProtocol->readJSONArrayStart()
      #6 /home/jking/thrift/test/php/gen-php/ThriftTest/ThriftTest.php(483): Thrift\Protocol\TJSONProtocol->readMessageBegin(NULL in /home/jking/thrift/lib/php/lib/Thrift/Transport/TSocket.php on line 278
      ======================================================================
      Return code: 255
      Test execution took 0.4 seconds.
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jking3 James E. King III
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: