jsch session instance
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jsch session instance
Hi, I am using jsch session in multiple test cases. I setup the server at start of the testcase and close the session at the end using groovy script.
Server setup code :
import com.jcraft.jsch.Session;
def servName = context.expand( '${#Project#servName}' )
ServerConfig servCon = new ServerConfig(servName)
def session = servCon.serverConnect(servName)
context.testCase.metaClass.session = session
log.info("Connected")
Session closing code:
import com.jcraft.jsch.Session;
def session = context.testCase.session
session.disconnect()
This works fine when testcases are run sequentially. However, throws error when they are run in parallel.
ERROR:An error occurred [session is down], see error log for details
ERROR:An error occurred [connection is closed by foreign host], see error log for details
I am guessing either it is not recognizing the individual sessions or closing all sessions when any of the testcase finishes. Rest of them throws the error. I would want to mention that whenever Ready!API is launched and run the testcases do run in parallel without any issues. But in the second run they throw this error. Is there a issue with how I am passing the instance?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am using jsch session in multiple test cases. I setup the server at start of the testcase and close the session at the end using groovy script.
Server setup code :
import com.jcraft.jsch.Session;
def servName = context.expand( '${#Project#servName}' )
ServerConfig servCon = new ServerConfig(servName)
def session = servCon.serverConnect(servName)
context.testCase.metaClass.session = session
log.info("Connected")
Session closing code:
import com.jcraft.jsch.Session;
def session = context.testCase.session
session.disconnect()
This works fine when testcases are run sequentially. However, throws error when they are run in parallel.
ERROR:An error occurred [session is down], see error log for details
ERROR:An error occurred [connection is closed by foreign host], see error log for details
I am guessing either it is not recognizing the individual sessions or closing all sessions when any of the testcase finishes. Rest of them throws the error. I would want to mention that whenever Ready!API is launched and run the testcases do run in parallel without any issues. But in the second run they throw this error. Is there a issue with how I am passing the instance?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using jsch session in multiple test cases. I setup server at start of the testcase and close the session at the end using groovy script.
Server setup code :
import com.jcraft.jsch.Session;
def servName = context.expand( '${#Project#servName}' )
ServerConfig servCon = new ServerConfig(servName)
def session = servCon.serverConnect(servName)
context.testCase.metaClass.session = session
log.info("Connected")
Session closing code:
import com.jcraft.jsch.Session;
def session = context.testCase.session
session.disconnect()
This works fine when testcases are run sequentially. However, throws error when they are run in parallel.
ERROR:An error occurred [session is down], see error log for details
ERROR:An error occurred [connection is closed by foreign host], see error log for details
I am guessing either it is not recognizing the individual sessions or closing all sessions when any of the testcase finishes and rest of them throws the error.
I would want to mention that whenever Ready!API is launched and run the testcases do run in parallel without any issues. But in the second run they throw this error.
Is there a issue with how I am passing the instance?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a community forum, please post question once and let some one answer, be little patient.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@nmrao I understand that. It was some issue where it gave me an error that the post was failed. I refreshed my profile a couple of times but there was nothing, so I kept trying. And after a while there were three questions in my profile. As you can see from the time difference of the questions. I tried finding an option to delete the redundant ones, but its not there.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
