Properties collection does not need to exist at startup time, test-suite fixings

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Collector@33050 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2010-12-03 15:45:29 +00:00
parent 68e19b3670
commit b3cbeb7ce2
2 changed files with 8 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package org.gcube.informationsystem.collector.impl.xmlstorage.exist;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.contexts.ICServiceContext;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.STATUS;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.XMLStorageNotAvailableException;
import org.gcube.informationsystem.collector.impl.resources.GCUBEInstanceStateResource;
import org.gcube.informationsystem.collector.impl.resources.GCUBEXMLResource;
@ -59,7 +60,11 @@ public class State {
if (Boolean.valueOf((String) ICServiceContext.getContext().getProperty("deleteRPsOnStartup", true))) {
// cleanup the RPs collection
logger.info("Deleting all RPs...");
State.dataManager.deleteCollection(new GCUBEInstanceStateResource().getCollectionName());
try {
State.dataManager.deleteCollection(new GCUBEInstanceStateResource().getCollectionName());
} catch (XMLStorageNotAvailableException e) {
logger.warn("Unable to delete the properties's collection");
}
} else {
logger.info("All RPs previously stored are kept in the storage");
}

View File

@ -54,7 +54,7 @@ public class AddDocumentsTester {
try {
AddDocumentsResponse r = addDocuments(portTypeURI,GCUBEScope.getScope(args[2]),
new org.apache.axis.types.URI ("gcube://testResourceName"),
new org.apache.axis.types.URI(args[6]), args[5],
new org.apache.axis.types.URI("gcube://InstanceState"), args[5],
new String[] { args[3] },
new Document[] {TestDocuments.loadDocument(args[4])} );
logger.info("Number of response wrappers "+ r.getAddDocumentResponseWrapper().length );
@ -66,7 +66,7 @@ public class AddDocumentsTester {
}
}
} catch (Exception e ) {
logger.error(e.toString());
logger.error("",e);
}
}