portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Ford" <caius1...@hotmail.com>
Subject RE: [J2] TestSimpleDeployment Failing
Date Tue, 06 Jul 2004 05:06:18 GMT
I dived into this and I still don't know what to do about it.  Maybe Scott
will know more.  Here's what I've found so far:

During the TestSimpleDeployment, a JarFileSystem is created based off of the
demo.war.  This file system contains an open jarfile.  If one closes the
file system, this will close the jarfile, thus allowing you to delete the
file.  However, if you close the file system, you cannot redeploy the same
app because of a cache in VFS which still points to the now closed file
system.

This explicitly closes a file system:

((VfsComponent)fileObj.getFileSystem()).close();

but, leaves it in the FileSystemManager cache.

There is a method on the manager that once can use to free up resources.  I
think this is the preferred method.  It is called by:

((DefaultFileSystemManager)fsManager).freeUnusedResources();

However, the file system keeps a count off accesses to the resources within
the file system.  It will not release sources if the number of access is
greater than zero.  You can decrease the number of access by calling close
on the objects that you access.  I modified the code to call close, but this
did not solve the problem.  Within the test, there is a method called
copyDeployables.  This method uses a VFS method (copyFrom) to copy the files
necessary for the test to run.  During this, the number of accesses are
increased by VFS's own methods.  The number never decreases because they do
not call close (or anything that might decrease the access #).

Basically, I can get parts of the test to work, but I can't get the whole
test to run.  I'm not sure that the FSManager that is used for copying
should be used for the J2 deployment test.  I've tried to create a brand new
FSManager at the start of the TestDeploy, but, during the course of the run,
the second attempt to delete the demo.war will fail instead of the first.  



Jeremy Ford
jford@apache.org


-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Monday, July 05, 2004 11:46 AM
To: Jetspeed Developers List
Subject: Re: [J2] TestSimpleDeployment Failing

The test fails on Windows, succeeds on Linux

For now I exclude test here in order to build until I can find some  
time to find the resource leak
I believe this unit test isolates the un-deploy issue on Windows  
(un-deploy fails on Windows, succeeds on Linux)

On Jul 5, 2004, at 9:37 AM, David Le Strat wrote:

> Is any else having the same issue.
> TestSimpleDeployment is failing with the latest head.
>
> Regards,
>
> David.
>
> Testcase:
> testDeploy(org.apache.jetspeed.deployment.TestSimpleDeployment):
> FAILED
> HW_App was not removed from the registry.
> junit.framework.AssertionFailedError: HW_App was not
> removed from the registry.
> 	at
> org.apache.jetspeed.deployment.TestSimpleDeployment.verifyDemoAppDelete 
> d(TestSimpleDeployment.java:233)
> 	at
> org.apache.jetspeed.deployment.TestSimpleDeployment.testDeploy(TestSimp 
> leDeployment.java:192)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
> va:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
> rImpl.java:25)
>
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office]   +01 707 773-4646
[mobile] +01 707 529 9194



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message