try
{
if ( theFile.exists() )
{
final long start = now();
final DeploymentStatus status = deploy( theFile );
final long elapsed = now() - start;
String msg = "Deployed: " +
quote( theFile ) + " in " + elapsed + "ms";
if ( getVerbose() )
{
msg = msg + ", DeploymentStatus = " + status;
}
println( msg );
if ( status.getStageStatus() != DeploymentStatus.STATUS_CODE_SUCCESS )
{
warning( "DeploymentMgrTest.testDeployUndeployModules: expected STATUS_CODE_SUCCESS " +
"for " + quote( theFile.toString() ) +
", got " + status.getStageStatus() );
failedSet.add( theFile.toString() );
continue;
}
String moduleID =
(String)status.getAdditionalStatus().get( DeploymentStatus.MODULE_ID_KEY );
if ( moduleID == null )
{
moduleID =(String) status.getAdditionalStatus().get( "moduleid" );
assert( moduleID != null );
warning( "WARNING: used 'moduleid' instead of " +
"DeploymentStatus.MODULE_ID_KEY (" + DeploymentStatus.MODULE_ID_KEY +
") as workaround for bug #6218705" );