Class TestSupportedRelationshipEffectivityConditions
java.lang.Object
org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
org.odpi.openmetadata.conformance.tests.repository.RepositoryConformanceTestCase
org.odpi.openmetadata.conformance.tests.repository.instances.TestSupportedRelationshipEffectivityConditions
The relationship counterpart of the entity effectivity conditions test: that a repository can select
relationships by their effectivity dates.
It exists separately rather than as more assertions on the entity test because of the last case below, which cannot be expressed with entities at all. The condition is built from two groups of nested conditions, and each group carries no property, operator or value of its own - all it does is group. A repository that evaluates such a group by testing it against every property of the instance has nothing to test when the instance has no properties, and can end up excluding it.
Entities cannot demonstrate that. Most entity types carry a unique attribute - qualifiedName on everything under Referenceable - and the repository refuses to create an instance of such a type with no properties at all. Relationships are the opposite: a great many open metadata relationship types define no attributes whatsoever, so a bare link with no properties is the ordinary case rather than a corner one, and every one of those instances is at risk.
The condition asserted here is the one a push-down of the effectivity window would use:
It exists separately rather than as more assertions on the entity test because of the last case below, which cannot be expressed with entities at all. The condition is built from two groups of nested conditions, and each group carries no property, operator or value of its own - all it does is group. A repository that evaluates such a group by testing it against every property of the instance has nothing to test when the instance has no properties, and can end up excluding it.
Entities cannot demonstrate that. Most entity types carry a unique attribute - qualifiedName on everything under Referenceable - and the repository refuses to create an instance of such a type with no properties at all. Relationships are the opposite: a great many open metadata relationship types define no attributes whatsoever, so a bare link with no properties is the ordinary case rather than a corner one, and every one of those instances is at risk.
The condition asserted here is the one a push-down of the effectivity window would use:
ALL of:
ANY of: effectiveFromTime IS NULL, effectiveFromTime <= T
ANY of: effectiveToTime IS NULL, effectiveToTime > T
Getting this wrong does not throw - it silently changes which relationships a caller sees.-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
OpenMetadataTestCase.TestPhase -
Field Summary
Fields inherited from class org.odpi.openmetadata.conformance.tests.repository.RepositoryConformanceTestCase
cohortRepositoryConnector, repositoryConformanceWorkPadFields inherited from class org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
defaultProfileId, defaultRequirementId, discoveredProperties, exceptionBean, notSupportedAssertions, successfulAssertions, successMessage, testCaseDescriptionURL, unsuccessfulAssertions -
Constructor Summary
ConstructorsConstructorDescriptionTestSupportedRelationshipEffectivityConditions(RepositoryConformanceWorkPad workPad, Map<String, EntityDef> entityDefs, RelationshipDef relationshipDef) Set up the test. -
Method Summary
Methods inherited from class org.odpi.openmetadata.conformance.tests.repository.RepositoryConformanceTestCase
addEntityProxyToRepository, addEntityToRepository, buildExceptionMessage, generatePropertiesForInstance, getAllPropertiesForInstance, getAllUniquePropertiesForInstance, getEntityDef, getMaxSearchResults, getMetadataCollection, getMinPropertiesForInstance, getPropertiesForInstance, getPropertiesForTypeDef, getPropertyValueForAttributeType, getRepositoryConnector, incrementSuccessfulCount, incrementUnsuccessfulCount, logTestEnd, logTestStart, propertyValueMatchesSearch, propertyValueMatchesSearch, updateTestIdByTypeMethods inherited from class org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
addDiscoveredProperty, addNotSupportedAssertion, assertCondition, assertCondition, assertObjectsAreEqual, cleanTest, cleanup, endAsynchronousTest, executeTest, executeTest, getResult, getSummary, getTestCaseDescriptionURL, getTestCaseId, getTestCaseName, isTestPassed, isTestRan, run, setSuccessMessage, startAsynchronousTest, toString, updateTestId, verifyCondition, verifyCondition, verifyObjectsAreEqual
-
Constructor Details
-
TestSupportedRelationshipEffectivityConditions
public TestSupportedRelationshipEffectivityConditions(RepositoryConformanceWorkPad workPad, Map<String, EntityDef> entityDefs, RelationshipDef relationshipDef) Set up the test.- Parameters:
workPad- working area for the conformance runentityDefs- the entity types supported by the repository under testrelationshipDef- the relationship type being tested
-
-
Method Details
-
run
Run the test.- Specified by:
runin classOpenMetadataTestCase- Throws:
Exception- something went wrong that the conformance suite could not handle
-