I think the best way to do this would be to:
A) make StringFromFile implement TestListener, and the hard part 
B) modify the code that parses strings and creates functions to look out for functions 
that implement TestListener and do something intelligent there.

I'm not sure how exactly that would work without digging into the code pretty 
substantially, but 
I think it could happen this way.  The code that makes functions in is .engine.util.

-Mike


On 10 Oct 2003 at 15:57, BAZLEY, Sebastian wrote:

> [Note: this is not an urgent problem, just something I'd like to understand
> and fix if possible.]
> 
> We're using the StringFromFile [SFF} function to read in test data.
> Each instance opens a file and keeps reading, re-opening at the end of file.
> 
> However, at the end of a test run, the file will be left open. 
> 
> This is not a problem in batch mode, as the server will then exit, but the
> GUI can be used to run multiple tests (*), so I thought I would try and find
> a way to detect the end of a test.
> 
> The TestListener interface has no effect, as functions are not nodes in the
> plan.
> 
> I then tried adding a finalizer, and that did not work either. Before the
> test starts, two instances are created and destroyed, but the instance(s)
> that are created during the test do not seem to get destroyed. 
> 
> [I tried adding a call to System.runFinalization() to the engine at the end
> of a run, but that did not help.]
> 
> It looks as though the run-time instances are not being released. New does
> not release them either.
> 
> Is there any other way for functions to register themselves to be called at
> the end of a test run?
> 
> I don't think any of the other functions need to do this, so it may not be
> worthwhile ... but if anyone has any clues/ideas as to how to solve the
> problem, please let me know!
> 
> (*) I don't know if the test plan is left around in the remote server after
> a run. If it is, then this could become a problem if users want to submit
> lots of tests via a long-running server.
> 
> S.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to