Skip to content

Commit

Permalink
Weaken an assertion during shadow classification
Browse files Browse the repository at this point in the history
This should fix failing TestSemiManual in provisioning-impl.
  • Loading branch information
mederly committed Feb 9, 2023
1 parent 9a25435 commit afeae51
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,14 @@ private void updateShadowClassificationAndTag(
.item(ShadowType.F_TAG).old(oldTag).replace(tag)
.asItemDeltas();

assert !itemDeltas.isEmpty();
if (itemDeltas.isEmpty()) {
// Strange but possible. If the (new) classification is unknown but the current classification in only partially
// unknown (e.g. account/unknown), this method is called, but - in fact - it does not update anything.
assert !classification.isKnown();
LOGGER.trace("Classification stays unchanged in {}", combinedObject);
return;
}

if (ctx.getTask().areShadowChangesSimulated()) {
sendSimulationData(combinedObject, itemDeltas, ctx.getTask(), result);
} else {
Expand Down

0 comments on commit afeae51

Please sign in to comment.