Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2015


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QF-Test] Shouldn't "Wait for client to connect" check if the client is (still) running?


  • Subject: [QF-Test] Shouldn't "Wait for client to connect" check if the client is (still) running?
  • From: Michael Pruemm <eso@?.org>
  • Date: Fri, 17 Jul 2015 15:13:47 +0200

Hi all,

I just had the following interesting scenario: My tests start the
client, which immediately fails because the JVM cannot allocate
sufficient memory. Right after the "Start SUT client", I wait for the
client to connect. This fails of course after the timeout with a
"ClientNotConnectedException".

This is of course technically correct, since the client did not connect.

However, since the client failed to start immediately, it was not even
running when the "Wait for client to connect" started to execute. In
that case, I would expect a "NoSuchClientException".

The description for ClientNotConnectedException seems to back me up here:

It differs from a NoSuchClientException in that there is an active
process for that name but no RMI connection.

I just confirmed that behavior by creating a new "Wait for client to
connect" node with a time-out of 2s and a client name of "foo". When I
execute this, it leads to a ClientNotConnectedException instead of a
NoSuchClientException.


To work around this problem, I am using this:

+ Start SUT client: $(client), delay after 2000 -- client starts slowly
+ If "${qftest:client.exitcode.$(client)}" != ""
  + call qfs.utils.testrun.stop.stopTestRun
+ Try
  + Wait for client to connect
  + Catch ClientNotConnectedException
    + ... deal with it somehow ...

Is this the best approach?


Here a few more details about my setup: QFTest 4.0.5; the client is a
Java application that gets started via a shell script.

- Michael


Videos Downloads Documentation Buy Free Trial