This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 28934 - XTest should delete work directory before test bag is started.
Summary: XTest should delete work directory before test bag is started.
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: xtest (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on: 28572
Blocks:
  Show dependency tree
 
Reported: 2002-11-22 10:49 UTC by David Kaspar
Modified: 2003-12-11 14:17 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2002-11-22 10:49:47 UTC
Lets have this situation:
1) There is some program (named Program) started
in test bag (named bag1).
2) This Program opens some file in work directory
(on Windows platform it took FS lock on file).
3) Bag1 finishs but Program does not for some
reason - so there is still FS lock on file in work
directory.
4) After test bag results are processed, next test
bag (named bag2) is started.
5) The first what Bag2 performs is work directory
deletion.
6) ERROR - If Program is still running, FS lock
still exists and Windows FS does not allow you to
delete work directory. So Bag2 ends with error
during execution. But problem is in Bag1 test bag,
not in Bag2 test bag.

Solution:
XTest should delete work directory before next
test bag is started.
Comment 1 Martin Brehovsky 2002-11-22 19:25:22 UTC
Well, this is true, but your solution cannot work, because if the
program holding the lock is still running, there is no way how to
delete the directory from any other program (even the one with the
highest access rights). The program has to be killed, which is a
problem on windows, since officially it does not keep parent-child
processes relationships.

So I don't think I can do anything with this stuff.
Comment 2 David Kaspar 2002-11-25 09:25:55 UTC
But with my solution XTest will find that there is problem with
deleting (preparing) working directory and will stop execution next
test bags until problem is solved.

All I want is to avoid sending invalid reports from XTest servers.
Comment 3 Martin Brehovsky 2002-11-25 16:04:08 UTC
I don't think this solution can be used, since when finishing the
testbag1, XTest does not know whether it can delete the working
directory and sometimes the working directory is reused for other
testbags.

The real cause of this is definitely the unability of XTest to kill
all children processes together with IDE, so the locks are not
released -> workdir cannot be deleted.

I'm closing it as wont fix, you might look and raise priority of
28572, which deals with the children killer :-)
Comment 4 David Kaspar 2002-11-25 16:18:33 UTC
Reopening:

So add precondition task that will be performed before next module
harness (test bags) is started. This task tries to delete all work
directory. This precondition task could be implemented in XTest (not
module harness).

This will avoid problems (with deleting working directory) that were
caused by previous modules tests.
Comment 5 Martin Brehovsky 2002-11-25 16:25:39 UTC
This could be achived by deleting the workdir from harness.xml file.
Or possibly by having a different workdir for each module. Libore will
you look at this, please?
Comment 6 L Martinek 2002-11-25 16:39:42 UTC
I don't think is's helpful. "Malo muziky za hodne penez" :-)
Comment 7 L Martinek 2002-11-26 15:57:07 UTC
Now I delete workdir after tests for whole module are executed. It
should not affect anything.
Comment 8 Quality Engineering 2003-07-02 12:20:16 UTC
Resolved for 3.3.x or earlier, no new info since then -> verify.
Comment 9 Quality Engineering 2003-07-02 12:22:00 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.