Skip to content

Instance Changes Profile

The technology under test is able to return the changes made to its instances in a period of time, so that a caller can follow them. The command (getInstanceChanges()) takes the start and end of the period and the number of changes wanted. It returns the changes, oldest first, with the watermark to use as the start of the next request. This is how the metadata change feed is able to report what has happened in a repository to a caller that does not receive its events.

Each change is a version of an entity, relationship or classification that the repository has stored. A repository that does not keep the versions of its instances does not support this profile.

The changes are not specific to a type of instance. Therefore, the test case for this profile runs once. It uses one type of entity and a classification that can be attached to it, and one type of relationship and the types of entity at its ends.

Get entity changes

The technology under test returns each version of an entity - its creation, updates, soft-delete and restore - as a change.

Assertions
ID Description
repository-instance-changes-01 <typeName> creation of an entity is returned as a change.
repository-instance-changes-02 <typeName> update of an entity is returned as a change.
repository-instance-changes-03 <typeName> soft-delete of an entity is returned as a change with the DELETED status.
repository-instance-changes-04 <typeName> restore of an entity is returned as a change whose previous status is DELETED.

Assertions 03 and 04 are reported as not supported if the technology under test does not support soft-delete.

Get classification changes

The technology under test returns each version of a classification as a change that identifies the entity it is attached to.

Assertions
ID Description
repository-instance-changes-05 <typeName> classification of an entity is returned as a change that identifies the entity.

Get relationship changes

The technology under test returns each version of a relationship as a change that identifies the entities at its ends.

Assertions
ID Description
repository-instance-changes-06 <typeName> creation of a relationship is returned as a change that identifies the entities at its ends.

Follow changes by watermark

The technology under test returns changes oldest first with a watermark for the next request, so that no change is missed or repeated. The test requests the changes for a period in a single request, and then again one change at a time, using the watermark from each response as the start of the next request. Both must return the same changes in the same order.

A response includes more changes than were requested when they were made at the same time, since the watermark is a time and could not otherwise distinguish between them.

Assertions
ID Description
repository-instance-changes-07 <typeName> changes are returned oldest first.
repository-instance-changes-08 <typeName> following the watermark returns each change once.

Purge removes changes

The technology under test returns no changes for an instance that has been purged. A purge is used when metadata must be removed - for legal reasons or to recover the space it uses - and it leaves nothing behind. Neither the purge, nor the changes made to the instance before it was purged, are returned.

Assertions
ID Description
repository-instance-changes-09 <typeName> no changes are returned for purged instances.

Raise an issue or comment below