[
https://issues.jboss.org/browse/AS7-1473?page=com.atlassian.jira.plugin.s...
]
Darran Lofthouse commented on AS7-1473:
---------------------------------------
The following error is reported for an issue where the undeployment does not complete: -
{noformat}
testExplodedFilesystemDeployment(org.jboss.as.test.surefire.servermodule.ServerInModuleDeploymentTestCase)
Time elapsed: 22.092 sec <<< FAILURE!
junit.framework.AssertionFailedError: Timed out waiting for registration/unregistration
at junit.framework.Assert.fail(Assert.java:47)
at
org.jboss.as.test.surefire.servermodule.ServerInModuleDeploymentTestCase$TestNotificationListener.await(ServerInModuleDeploymentTestCase.java:509)
at
org.jboss.as.test.surefire.servermodule.ServerInModuleDeploymentTestCase.testDeployments(ServerInModuleDeploymentTestCase.java:435)
at
org.jboss.as.test.surefire.servermodule.ServerInModuleDeploymentTestCase.testExplodedFilesystemDeployment(ServerInModuleDeploymentTestCase.java:293)
{noformat}
This is caused by a race condition between the test case and the
FileSystemDeploymentService.
Firstly the test case is held waiting for the presence of a .deployed marker to be visible
so that is can be deleted, the service however risks writing the same file twice!!
{code}
try {
marker.createNewFile();
fos = new FileOutputStream(marker);
fos.write(deploymentName.getBytes());
} catch (IOException io) {
{code}
The file can be created by createNewFile and then again when FileOutputStream is
instantiated it can be created again, so if the delete occurs between the two calls the
file gets created for a second time.
In addition to this there is a .isdeploying marker file, however this is removed before
the .deployed is created - if this was removed AFTER the deployment is complete including
the creation of the .deployed marker this would be a better file to wait on before
deleting the .deployed.
Deleting .deployed occasionaly file is deployed again immediately
after undeployment.
-------------------------------------------------------------------------------------
Key: AS7-1473
URL:
https://issues.jboss.org/browse/AS7-1473
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Reporter: Darran Lofthouse
Assignee: Darran Lofthouse
Fix For: 7.0.1.Final
Attachments:
org.jboss.as.test.surefire.servermodule.ServerInModuleDeploymentTestCase-output.txt
Currently investigating the ServerInModuleDeploymentTestCase intermittent failures and
this seems to be the common cause of the failure. The testFilesystemDeployment test
undeploys the deployment at the end but for some reason it is deployed again,
testExplodedFilesystemDeployment then fails as when it attempts to deploy it actually
triggers a redeployment but is only expecting a single JMX notification.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira