Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "no sync policy" treatment in LiveSync
Processing of such resource objects was originally considered to be erroneous, so live sync task stopped when they were encountered. But, in fact, these should be simply ignored. So we added "not applicable" to the list of accepted operation result statuses. This resolves MID-5999. Cherry-picked and adapted from 3e4e0be.
- Loading branch information
Showing
8 changed files
with
198 additions
and
79 deletions.
There are no files selected for viewing
169 changes: 102 additions & 67 deletions
169
...test/src/test/java/com/evolveum/midpoint/model/intest/sync/TestLiveSyncTaskMechanics.java
Large diffs are not rendered by default.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
model/model-intest/src/test/resources/sync/resource-dummy-no-policy.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2010-2019 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<resource oid="3908fabe-8608-4db0-93ee-e06c5691eb8f" | ||
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" | ||
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" | ||
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"> | ||
|
||
<name>Dummy Resource No Policy</name> | ||
<connectorRef type="c:ConnectorType"> | ||
<filter> | ||
<q:and> | ||
<q:equal> | ||
<q:path>connectorType</q:path> | ||
<q:value>com.evolveum.icf.dummy.connector.DummyConnector</q:value> | ||
</q:equal> | ||
<q:equal> | ||
<q:path>connectorVersion</q:path> | ||
<q:value>2.0</q:value> | ||
</q:equal> | ||
</q:and> | ||
</filter> | ||
</connectorRef> | ||
<connectorConfiguration xmlns:icfi="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.icf.dummy/com.evolveum.icf.dummy.connector.DummyConnector" | ||
xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"> | ||
<icfc:configurationProperties> | ||
<icfi:instanceId>noPolicy</icfi:instanceId> | ||
</icfc:configurationProperties> | ||
</connectorConfiguration> | ||
|
||
<schemaHandling> | ||
<objectType> | ||
<displayName>Default Account</displayName> | ||
<default>true</default> | ||
<objectClass>ri:AccountObjectClass</objectClass> | ||
<attribute> | ||
<ref>icfs:name</ref> | ||
<inbound> | ||
<target> | ||
<path>name</path> | ||
</target> | ||
</inbound> | ||
</attribute> | ||
</objectType> | ||
</schemaHandling> | ||
|
||
<synchronization> | ||
<!-- no policy! --> | ||
</synchronization> | ||
</resource> |
27 changes: 27 additions & 0 deletions
27
model/model-intest/src/test/resources/sync/task-no-policy.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2010-2019 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<task oid="b2aa4e0a-1fce-499d-8502-ece187b24ae4" | ||
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:ext="http://midpoint.evolveum.com/xml/ns/public/model/extension-3" | ||
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"> | ||
|
||
<name>Live Sync No Policy</name> | ||
|
||
<extension> | ||
<ext:objectclass>ri:AccountObjectClass</ext:objectclass> | ||
</extension> | ||
|
||
<taskIdentifier>b2aa4e0a-1fce-499d-8502-ece187b24ae4</taskIdentifier> | ||
<ownerRef oid="00000000-0000-0000-0000-000000000002"/> | ||
<executionStatus>runnable</executionStatus> | ||
|
||
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3</handlerUri> | ||
<objectRef oid="3908fabe-8608-4db0-93ee-e06c5691eb8f" type="ResourceType"/> <!-- no-policy --> | ||
<recurrence>single</recurrence> | ||
</task> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters