How to timeout live invocation at VS level  and Global level?
search cancel

How to timeout live invocation at VS level  and Global level?

book

Article ID: 200734

calendar_today

Updated On:

Products

CA Cloud Test Mobile CA Application Test

Issue/Introduction

How to timeout live invocation at VS level  and Global level?

Environment

Release : 10.X all supported versions

Component : CA Service Virtualization

Resolution

 
 

There are 2 ways to do it. At a global VSE level and at individual VS level. 

1, HTTP Live Invocation Timeout at a Global level

There is no separate property for HTTP Live invocation. There are properties applicable for all HTTP transactions and they are:

lisa.http.timeout.connection

lisa.http.timeout.socket

Pass these properties in local.properties

The value must be in milliseconds

Eg:

lisa.http.timeout.connection=30000

lisa.http.timeout.socket=5000

NOTE: The changes made here are applicable across all HTTP connections not just Live invocation alone

What is the difference between these 2 properties ?

The first property "lisa.http.timeout.connection" translates to Socket connection timeout. (java socket). This is the timeout in establishing the socket connection

The second property "lisa.http.timeout.socket" translates to SOTimeout on a socket. This is the timeout for receiving individual packets once the socket is established

Sotimeout vs Connectiontimeout (official response found on Java site)

connection timeout is the maximum amount of time that the program is willing to wait to setup a connection to another process. You aren't getting or posting any application data at this point, just establishing the connection, itself. A socket timeout is the timeout when waiting for individual packets

2. HTTP Live Invocation Timeouts at Individual VS Level

Most often you dont want to set the timeouts at a global level and impact all the http connection. You want this to be very local to that specific VS that you deal with. 

This can be achieved with the following mechanism:

Ultimately, you need to set 2 properties in the context of testExec and you could do that using Scriptable DPH in the listen step.

 

Attachments