Skip to content

Commit

Permalink
Possible fix for unstable TestReconTask (+logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Nov 27, 2015
1 parent d80201e commit 2248eb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Expand Up @@ -185,6 +185,7 @@ public void setDebugListener(LensDebugListener debugListener) {
private static final int DEFAULT_MAX_CLICKS = 200;

public <F extends ObjectType> HookOperationMode run(LensContext<F> context, Task task, OperationResult result) throws SchemaException, PolicyViolationException, ExpressionEvaluationException, ObjectNotFoundException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, SecurityViolationException {
LOGGER.trace("Running clockwork for context {}", context);
if (InternalsConfig.consistencyChecks) {
context.checkConsistence();
}
Expand Down
2 changes: 1 addition & 1 deletion model/model-intest/src/test/resources/logback-test.xml
Expand Up @@ -76,7 +76,7 @@
<logger name="com.evolveum.midpoint.security" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.sync.FocusValidityScannerTaskHandler" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.util.AbstractSearchIterativeTaskHandler" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.sync.SynchronizationService" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.sync.SynchronizationService" level="TRACE" />
<logger name="com.evolveum.midpoint.model.impl.controller.ModelController" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.controller.ModelInteractionServiceImpl" level="TRACE" />
<logger name="com.evolveum.icf.dummy" level="INFO" />
Expand Down
Expand Up @@ -226,7 +226,13 @@ public <T extends ShadowType> T handleError(T shadow, FailedOperation op, Except

Collection<? extends ItemDelta> deadModification = PropertyDelta.createModificationReplacePropertyCollection(ShadowType.F_DEAD, shadow.asPrismObject().getDefinition(), true);
ConstraintsChecker.onShadowModifyOperation(deadModification);
cacheRepositoryService.modifyObject(ShadowType.class, shadow.getOid(), deadModification, result);
try {
cacheRepositoryService.modifyObject(ShadowType.class, shadow.getOid(), deadModification, result);
} catch (ObjectNotFoundException e) {
// The shadow is not there. So we cannot mark it as dead.
LOGGER.debug("Cannot modify shadow {} in consistency compensation (discovery): {} - this is probably harmless", shadow, e.getMessage());

}

shadow.setDead(true);
ResourceObjectShadowChangeDescription getChange = createResourceObjectShadowChangeDescription(shadow,
Expand Down

0 comments on commit 2248eb4

Please sign in to comment.