Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Synchronously delete project
Synchronously delete project [message #326354] Mon, 17 March 2008 15:24 Go to next message
Marko Tomljenovic is currently offline Marko TomljenovicFriend
Messages: 62
Registered: July 2009
Member
Hello folks,

during running a JUnit Test (where I create test projects to work on
during the tests) I am getting a ResourceException that a project already
exists because the deletion is not finished yet from the last tearDown()
method invocation.

Is the IResource.delete method returning after the resource (and its
children) are deleted or is it deleting the IResource asynchronously in a
seperate Thread?

If it is done in another thread how can I know when and if the resource is
really deleted?
Re: Synchronously delete project [message #326358 is a reply to message #326354] Mon, 17 March 2008 16:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Marko,

You're sure the teardown didn't fail? I think delete should be
synchronous...


Marko T. wrote:
> Hello folks,
>
> during running a JUnit Test (where I create test projects to work on
> during the tests) I am getting a ResourceException that a project
> already exists because the deletion is not finished yet from the last
> tearDown() method invocation.
>
> Is the IResource.delete method returning after the resource (and its
> children) are deleted or is it deleting the IResource asynchronously
> in a seperate Thread?
>
> If it is done in another thread how can I know when and if the
> resource is really deleted?
>
>
>
Re: Synchronously delete project [message #326360 is a reply to message #326354] Mon, 17 March 2008 18:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Marko T." <Marko.Tomljenovic@de.bosch.com> wrote in message
news:985be4ba3ada943639531db0670db1f2$1@www.eclipse.org...
> Hello folks,
>
> during running a JUnit Test (where I create test projects to work on
> during the tests) I am getting a ResourceException that a project already
> exists because the deletion is not finished yet from the last tearDown()
> method invocation.


Hi, Marko. I've seen that happen quite a lot. I finally gave up trying to
figure it out, and just tweaked my test code so that every project gets a
unique name (based on incrementing a counter, e.g., TestProject0001,
TestProject0002...).
Re: Synchronously delete project [message #326361 is a reply to message #326360] Mon, 17 March 2008 19:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------010903030104010002060604
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Walter,

I wonder if there are underlying OS file system delays involved...


Walter Harley wrote:
> "Marko T." <Marko.Tomljenovic@de.bosch.com> wrote in message
> news:985be4ba3ada943639531db0670db1f2$1@www.eclipse.org...
>
>> Hello folks,
>>
>> during running a JUnit Test (where I create test projects to work on
>> during the tests) I am getting a ResourceException that a project already
>> exists because the deletion is not finished yet from the last tearDown()
>> method invocation.
>>
>
>
> Hi, Marko. I've seen that happen quite a lot. I finally gave up trying to
> figure it out, and just tweaked my test code so that every project gets a
> unique name (based on incrementing a counter, e.g., TestProject0001,
> TestProject0002...).
>
>
>


--------------010903030104010002060604
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Walter,<br>
<br>
I wonder if there are underlying OS file system delays involved...<br>
&nbsp;<br>
<br>
Walter Harley wrote:
<blockquote cite="mid:frmduc$vu7$1@build.eclipse.org" type="cite">
<pre wrap="">"Marko T." <a class="moz-txt-link-rfc2396E" href="mailto:Marko.Tomljenovic@de.bosch.com">&lt;Marko.Tomljenovic@de.bosch.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:985be4ba3ada943639531db0670db1f2$1@www.eclipse.org">news:985be4ba3ada943639531db0670db1f2$1@www.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hello folks,

during running a JUnit Test (where I create test projects to work on
during the tests) I am getting a ResourceException that a project already
exists because the deletion is not finished yet from the last tearDown()
method invocation.
</pre>
</blockquote>
<pre wrap=""><!---->

Hi, Marko. I've seen that happen quite a lot. I finally gave up trying to
figure it out, and just tweaked my test code so that every project gets a
unique name (based on incrementing a counter, e.g., TestProject0001,
TestProject0002...).


</pre>
</blockquote>
<br>
</body>
</html>

--------------010903030104010002060604--
Re: Synchronously delete project [message #326389 is a reply to message #326361] Tue, 18 March 2008 16:44 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:frmgib$olr$1@build.eclipse.org...
> I wonder if there are underlying OS file system delays involved...

It may possibly also have to do with the Java indexer thread?
Previous Topic:Remove filter input from Wizard
Next Topic:workspace.findFilesForLocation ?
Goto Forum:
  


Current Time: Wed Jul 17 19:48:55 GMT 2024

Powered by FUDForum. Page generated in 0.07164 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top