You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mxmrlv <gi...@git.apache.org> on 2017/05/11 13:26:04 UTC

[GitHub] incubator-ariatosca pull request #129: ARIA-213 Sporadic tests failures over...

Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/129#discussion_r115980345
  
    --- Diff: aria/storage/instrumentation.py ---
    @@ -177,22 +232,30 @@ def apply_tracked_changes(tracked_changes, model):
                     instance = None
                     for attribute_name, value in tracked_attributes.items():
                         if value.initial != value.current:
    -                        if not instance:
    -                            instance = mapi.get(instance_id)
    +                        instance = instance or mapi.get(instance_id)
                             setattr(instance, attribute_name, value.current)
                     if instance:
                         _validate_version_id(instance, mapi)
                         mapi.update(instance)
                         successfully_updated_changes[mapi_name][instance_id] = [
                             v.dict for v in tracked_attributes.values()]
    +
    +        for mapi_name, new_instance in new_instances.items():
    +            successfully_updated_changes[mapi_name] = dict()
    +            mapi = getattr(model, mapi_name)
    +            for new_instance_kwargs in sorted(new_instance.values()):
    --- End diff --
    
    commentttt
    why sorted


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---