Service Virtualization

 View Only
  • 1.  How to keep a socket connection with a stub alive?

    Posted Oct 24, 2019 01:23 AM
    Hi Everyone,
    There is a need for us have an active TCP connection between the HTTP request generating server/socket and the DevTest stub. The incoming request has the 'Connection:Keep-Alive' value in the header. However in the response from the stub, I do not see a a similar value generated by Lisa. For the subsequent call to the Lisa stub, a new socket connection is established from the server. Multiple requests go to the stub in a span of 10ms, which requires the connection to be alive. Currently it appears to not happen and is resulting in a failure on the server after the first call. The same server works fine when connected to an actual system instead of the stub. When I searched the community, found the following article @Shiney Abraham https://community.broadcom.com/communities/community-home/librarydocuments/viewdocument?DocumentKey=735d5824-408b-4fd3-8d04-716d414a700d

    Tried the following:
    1) Added Connection:Keep-Alive in the header of the response. This did not make a difference.
    2) Added a forced delay of 1 sec on the server between the first and the second calls to the stub, it works fine.

    All the requests and responses are HTTP/1.1

    Any inputs from the members appreciated :)​​


  • 2.  RE: How to keep a socket connection with a stub alive?

    Broadcom Employee
    Posted Oct 24, 2019 09:43 AM
    Hi Prashanth.

    you have posted this question in the VSE community, which serves users of IBM's mainframe operating system z/VSE.  I would recommend you post your question in the "Service Virtualization" community.

    regards,

    David Jamieson


  • 3.  RE: How to keep a socket connection with a stub alive?
    Best Answer

    Posted Oct 24, 2019 07:24 PM
    Thank you David for the message. I did post it in the Service Virtualisation group, but also cross linked it with the VSE group guessing it to be (Virtual Service Environments). Your above post clarifies. Please feel free to remove this question from the VSE group.


  • 4.  RE: How to keep a socket connection with a stub alive?

    Posted Oct 31, 2019 06:00 AM
    It appears DevTest doesn't support Persistent HTTP connections, which is really surprising. I had to use a Springboot proxy between my stub and the Lisa to test the Keep-Alive feature of the application under test.