Fixed exception management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@144248 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d0290d6bd4
commit
68b96c5a6e
|
@ -16,30 +16,32 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resour
|
||||||
*/
|
*/
|
||||||
public interface ResourceRegistryPublisher {
|
public interface ResourceRegistryPublisher {
|
||||||
|
|
||||||
public <F extends Facet> F createFacet(Class<F> facetClass, F facet);
|
public <F extends Facet> F createFacet(Class<F> facetClass, F facet) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <F extends Facet> F updateFacet(Class<F> facetClass, F facet);
|
public <F extends Facet> F updateFacet(Class<F> facetClass, F facet) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <F extends Facet> boolean deleteFacet(F facet);
|
public <F extends Facet> boolean deleteFacet(F facet) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <R extends Resource> R createResource(Class<R> resourceClass,
|
public <R extends Resource> R createResource(Class<R> resourceClass,
|
||||||
R resource);
|
R resource) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <R extends Resource> R updateResource(Class<R> resourceClass, R resource);
|
public <R extends Resource> R updateResource(Class<R> resourceClass, R resource) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <R extends Resource> boolean deleteResource(R resource);
|
public <R extends Resource> boolean deleteResource(R resource) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> C createConsistsOf(
|
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> C createConsistsOf(
|
||||||
Class<C> consistsOfClass, C consistsOf);
|
Class<C> consistsOfClass, C consistsOf) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> boolean deleteConsistsOf(
|
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> boolean deleteConsistsOf(
|
||||||
C consistsOf);
|
C consistsOf) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> I createIsRelatedTo(
|
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> I createIsRelatedTo(
|
||||||
Class<I> isRelatedToClass, I isRelatedTo);
|
Class<I> isRelatedToClass, I isRelatedTo) throws ResourceRegistryException;
|
||||||
|
|
||||||
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> boolean deleteIsRelatedTo(
|
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> boolean deleteIsRelatedTo(
|
||||||
I isRelatedTo);
|
I isRelatedTo) throws ResourceRegistryException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public boolean addResourceToContext(UUID uuid)
|
public boolean addResourceToContext(UUID uuid)
|
||||||
throws ResourceNotFoundException, ContextNotFoundException,
|
throws ResourceNotFoundException, ContextNotFoundException,
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <F extends Facet> F createFacet(Class<F> facetClass, F facet) {
|
public <F extends Facet> F createFacet(Class<F> facetClass, F facet) throws ResourceRegistryException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info("Going to create: {}", facet);
|
logger.info("Going to create: {}", facet);
|
||||||
|
@ -80,6 +80,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
F f = delegate.make(call);
|
F f = delegate.make(call);
|
||||||
logger.info("{} successfully created", f);
|
logger.info("{} successfully created", f);
|
||||||
return f;
|
return f;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Creating {}", facet, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Creating {}", facet, e);
|
logger.error("Error Creating {}", facet, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -87,7 +91,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <F extends Facet> F updateFacet(Class<F> facetClass, F facet) {
|
public <F extends Facet> F updateFacet(Class<F> facetClass, F facet) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to update: {}", facet);
|
logger.info("Going to update: {}", facet);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -108,6 +112,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
F f = delegate.make(call);
|
F f = delegate.make(call);
|
||||||
logger.info("{} successfully updated", f);
|
logger.info("{} successfully updated", f);
|
||||||
return f;
|
return f;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Updating {}", facet, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Updating {}", facet, e);
|
logger.error("Error Updating {}", facet, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -115,7 +123,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <F extends Facet> boolean deleteFacet(F facet) {
|
public <F extends Facet> boolean deleteFacet(F facet) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to delete: {}", facet);
|
logger.info("Going to delete: {}", facet);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -136,6 +144,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
logger.info("{} {}", facet, deleted ? " successfully deleted"
|
logger.info("{} {}", facet, deleted ? " successfully deleted"
|
||||||
: "was NOT deleted");
|
: "was NOT deleted");
|
||||||
return deleted;
|
return deleted;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Removing {}", facet, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Removing {}", facet, e);
|
logger.error("Error Removing {}", facet, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -144,7 +156,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <R extends Resource> R createResource(Class<R> resourceClass,
|
public <R extends Resource> R createResource(Class<R> resourceClass,
|
||||||
R resource) {
|
R resource) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to create: {}", resource);
|
logger.info("Going to create: {}", resource);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -166,6 +178,11 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
R r = delegate.make(call);
|
R r = delegate.make(call);
|
||||||
logger.info("{} successfully created", r);
|
logger.info("{} successfully created", r);
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Creating {}", resource, e);
|
||||||
|
throw e;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Creating {}", resource, e);
|
logger.error("Error Creating {}", resource, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -174,7 +191,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <R extends Resource> R updateResource(Class<R> resourceClass,
|
public <R extends Resource> R updateResource(Class<R> resourceClass,
|
||||||
R resource) {
|
R resource) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to update: {}", resource);
|
logger.info("Going to update: {}", resource);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -196,6 +213,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
R r = delegate.make(call);
|
R r = delegate.make(call);
|
||||||
logger.info("{} update created", r);
|
logger.info("{} update created", r);
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Creating {}", resource, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Creating {}", resource, e);
|
logger.error("Error Creating {}", resource, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -203,7 +224,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <R extends Resource> boolean deleteResource(R resource) {
|
public <R extends Resource> boolean deleteResource(R resource) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to delete: {}", resource);
|
logger.info("Going to delete: {}", resource);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -224,6 +245,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
logger.info("{} {}", resource, deleted ? " successfully deleted"
|
logger.info("{} {}", resource, deleted ? " successfully deleted"
|
||||||
: "was NOT deleted");
|
: "was NOT deleted");
|
||||||
return deleted;
|
return deleted;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Removing {}", resource, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Removing {}", resource, e);
|
logger.error("Error Removing {}", resource, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -232,7 +257,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> C createConsistsOf(
|
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> C createConsistsOf(
|
||||||
Class<C> consistsOfClass, C consistsOf) {
|
Class<C> consistsOfClass, C consistsOf) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to create: {}", consistsOf);
|
logger.info("Going to create: {}", consistsOf);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -264,6 +289,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
C c = delegate.make(call);
|
C c = delegate.make(call);
|
||||||
logger.info("{} successfully created", c);
|
logger.info("{} successfully created", c);
|
||||||
return c;
|
return c;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Creating {}", consistsOf, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Creating {}", consistsOf, e);
|
logger.error("Error Creating {}", consistsOf, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -272,7 +301,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> boolean deleteConsistsOf(
|
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> boolean deleteConsistsOf(
|
||||||
C consistsOf) {
|
C consistsOf) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to delete: {}", consistsOf);
|
logger.info("Going to delete: {}", consistsOf);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -293,6 +322,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
logger.info("{} {}", consistsOf, deleted ? " successfully deleted"
|
logger.info("{} {}", consistsOf, deleted ? " successfully deleted"
|
||||||
: "was NOT deleted");
|
: "was NOT deleted");
|
||||||
return deleted;
|
return deleted;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Removing {}", consistsOf, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Removing {}", consistsOf, e);
|
logger.error("Error Removing {}", consistsOf, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -301,7 +334,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> I createIsRelatedTo(
|
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> I createIsRelatedTo(
|
||||||
Class<I> isRelatedToClass, I isRelatedTo) {
|
Class<I> isRelatedToClass, I isRelatedTo) throws ResourceRegistryException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info("Going to create: {}", isRelatedTo);
|
logger.info("Going to create: {}", isRelatedTo);
|
||||||
|
@ -334,6 +367,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
I i = delegate.make(call);
|
I i = delegate.make(call);
|
||||||
logger.info("{} successfully created", i);
|
logger.info("{} successfully created", i);
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Creating {}", isRelatedTo, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Creating {}", isRelatedTo, e);
|
logger.error("Error Creating {}", isRelatedTo, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -342,7 +379,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> boolean deleteIsRelatedTo(
|
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> boolean deleteIsRelatedTo(
|
||||||
I isRelatedTo) {
|
I isRelatedTo) throws ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
logger.info("Going to delete: {}", isRelatedTo);
|
logger.info("Going to delete: {}", isRelatedTo);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
@ -363,6 +400,10 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
logger.info("{} {}", isRelatedTo, deleted ? " successfully deleted"
|
logger.info("{} {}", isRelatedTo, deleted ? " successfully deleted"
|
||||||
: "was NOT deleted");
|
: "was NOT deleted");
|
||||||
return deleted;
|
return deleted;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Removing {}", isRelatedTo, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Removing {}", isRelatedTo, e);
|
logger.error("Error Removing {}", isRelatedTo, e);
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -399,6 +440,11 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
Resource.NAME, uuid, added ? "successfully" : "NOT",
|
Resource.NAME, uuid, added ? "successfully" : "NOT",
|
||||||
Context.NAME, context);
|
Context.NAME, context);
|
||||||
return added;
|
return added;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
|
Resource.NAME, uuid, Context.NAME, context, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
Resource.NAME, uuid, Context.NAME, context, e);
|
Resource.NAME, uuid, Context.NAME, context, e);
|
||||||
|
@ -442,6 +488,11 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
Facet.NAME, uuid, added ? "successfully" : "NOT",
|
Facet.NAME, uuid, added ? "successfully" : "NOT",
|
||||||
Context.NAME, context);
|
Context.NAME, context);
|
||||||
return added;
|
return added;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
|
Facet.NAME, uuid, Context.NAME, context, e);
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
Facet.NAME, uuid, Context.NAME, context, e);
|
Facet.NAME, uuid, Context.NAME, context, e);
|
||||||
|
@ -487,6 +538,12 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
Resource.NAME, uuid, removed ? "successfully" : "NOT",
|
Resource.NAME, uuid, removed ? "successfully" : "NOT",
|
||||||
Context.NAME, context);
|
Context.NAME, context);
|
||||||
return removed;
|
return removed;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
|
Resource.NAME, uuid, Context.NAME, context, e);
|
||||||
|
throw e;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
Resource.NAME, uuid, Context.NAME, context, e);
|
Resource.NAME, uuid, Context.NAME, context, e);
|
||||||
|
@ -531,6 +588,12 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
|
||||||
Facet.NAME, uuid, removed ? "successfully" : "NOT",
|
Facet.NAME, uuid, removed ? "successfully" : "NOT",
|
||||||
Context.NAME, context);
|
Context.NAME, context);
|
||||||
return removed;
|
return removed;
|
||||||
|
|
||||||
|
} catch (ResourceRegistryException e) {
|
||||||
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
|
Facet.NAME, uuid, Context.NAME, context, e);
|
||||||
|
throw e;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
logger.error("Error Adding {} with UUID {} to current {} : {}",
|
||||||
Facet.NAME, uuid, Context.NAME, context, e);
|
Facet.NAME, uuid, Context.NAME, context, e);
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.gcube.informationsystem.model.relation.consistsof.HasPersistentMemory
|
||||||
import org.gcube.informationsystem.model.relation.consistsof.HasVolatileMemory;
|
import org.gcube.informationsystem.model.relation.consistsof.HasVolatileMemory;
|
||||||
import org.gcube.informationsystem.model.relation.isrelatedto.Hosts;
|
import org.gcube.informationsystem.model.relation.isrelatedto.Hosts;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceNotFoundException;
|
||||||
import org.gcube.informationsystem.resourceregistry.client.proxy.ResourceRegistryClient;
|
import org.gcube.informationsystem.resourceregistry.client.proxy.ResourceRegistryClient;
|
||||||
import org.gcube.informationsystem.resourceregistry.client.proxy.ResourceRegistryClientFactory;
|
import org.gcube.informationsystem.resourceregistry.client.proxy.ResourceRegistryClientFactory;
|
||||||
import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegistryPublisher;
|
import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegistryPublisher;
|
||||||
|
@ -152,13 +153,13 @@ public class MultiContextTest extends ScopedTest {
|
||||||
Assert.assertTrue(addedToContext);
|
Assert.assertTrue(addedToContext);
|
||||||
|
|
||||||
UUID eServiceUUID = createEService.getHeader().getUUID();
|
UUID eServiceUUID = createEService.getHeader().getUUID();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
resourceRegistryClient.getInstance(EService.class, eServiceUUID);
|
resourceRegistryClient.getInstance(EService.class, eServiceUUID);
|
||||||
}catch(ResourceRegistryException e){
|
}catch(ResourceNotFoundException e){
|
||||||
logger.debug("Resource with {} Not Found as Expected", uuid.toString());
|
logger.debug("Resource with {} Not Found as Expected", uuid.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean deleted = resourceRegistryPublisher.deleteResource(createdHN);
|
boolean deleted = resourceRegistryPublisher.deleteResource(createdHN);
|
||||||
Assert.assertTrue(deleted);
|
Assert.assertTrue(deleted);
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,8 @@ public class ScopedTest {
|
||||||
GCUBE_DEVSEC = properties.getProperty(GCUBE_DEVSEC_VARNAME);
|
GCUBE_DEVSEC = properties.getProperty(GCUBE_DEVSEC_VARNAME);
|
||||||
GCUBE_DEVSEC_DEVVRE = properties.getProperty(GCUBE_DEVSEC_DEVVRE_VARNAME);
|
GCUBE_DEVSEC_DEVVRE = properties.getProperty(GCUBE_DEVSEC_DEVVRE_VARNAME);
|
||||||
|
|
||||||
DEFAULT_TEST_SCOPE = GCUBE_DEVNEXT;
|
DEFAULT_TEST_SCOPE = GCUBE_DEVSEC;
|
||||||
ALTERNATIVE_TEST_SCOPE = GCUBE_DEVNEXT_NEXTNEXT;
|
ALTERNATIVE_TEST_SCOPE = GCUBE_DEVSEC_DEVVRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCurrentScope(String token) throws ObjectNotFound, Exception{
|
public static String getCurrentScope(String token) throws ObjectNotFound, Exception{
|
||||||
|
|
Loading…
Reference in New Issue