)]}'
{"mistral/tests/unit/services/test_expired_executions_policy.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6890610f77d90fa969fac328f52701d393de0678","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 - Alcatel-lucent, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#    you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_e67c50ed","line":1,"updated":"2015-09-03 07:50:36.000000000","message":"You could also add StackStorm header here.","commit_id":"8c04da4aa0de53713dadfb31760551973e5921fc"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6890610f77d90fa969fac328f52701d393de0678","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Switch context to Admin since expiration policy running as Admin."},{"line_number":116,"context_line":"        _switch_context(None, True)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        _set_expiration_policy_config(1, 30)"},{"line_number":119,"context_line":"        expiration_policy.run_execution_expiration_policy(self, ctx)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Only non_expired available (update_at \u003c older_than)."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_46409ca5","line":118,"updated":"2015-09-03 07:50:36.000000000","message":"I don\u0027t understand these changes. In this line you set \"older_than\" to 30 minutes ago from now. So the assertion on line 125 must not pass because exec \u0027987\u0027 must not be expired (since it\u0027s only 15 minutes old). In the previous version this assertion was valid because \"older_than\" was set to 10 minutes.\n\nMy assumption is that we may be masking a real problem with these changes.\n\nWhat am I missing? Could you please provide your explanations?","commit_id":"8c04da4aa0de53713dadfb31760551973e5921fc"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"5713573e596fcc978c78b1b8d12b84e122d8c3d7","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Switch context to Admin since expiration policy running as Admin."},{"line_number":116,"context_line":"        _switch_context(None, True)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        _set_expiration_policy_config(1, 30)"},{"line_number":119,"context_line":"        expiration_policy.run_execution_expiration_policy(self, ctx)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Only non_expired available (update_at \u003c older_than)."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_8c09f32e","line":118,"in_reply_to":"da20952f_46409ca5","updated":"2015-09-03 08:30:20.000000000","message":"AFAIK, expiration policy works by checking field \u0027updated_at\u0027, no \u0027created_at\u0027. So, in both cases that execution 987 is not expired yet. I don\u0027t understand this changes, too. Winson, could you please give explanations here?","commit_id":"8c04da4aa0de53713dadfb31760551973e5921fc"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"00e9dafa67f13d70be659198cb1cd9e526d97350","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        # Switch context to Admin since expiration policy running as Admin."},{"line_number":116,"context_line":"        _switch_context(None, True)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        _set_expiration_policy_config(1, 30)"},{"line_number":119,"context_line":"        expiration_policy.run_execution_expiration_policy(self, ctx)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Only non_expired available (update_at \u003c older_than)."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_0cfb877c","line":118,"in_reply_to":"da20952f_8c09f32e","updated":"2015-09-03 18:46:16.000000000","message":"Basically when I run tox, I very frequently get the error with this unit test where it complains all the executions are gone and https://github.com/openstack/mistral/blob/master/mistral/tests/unit/services/test_expired_executions_policy.py#L123 does not match (1 !\u003d 0). This unit test is expiring executions that haven\u0027t been updated for 10 minutes. 987 last update is 5 minutes ago. I think there is a timing problem with when the expiration thread runs so that by the time it runs, 987 is already \"older_than\" the 10 min configuration. By changing the \"older_than\" to 30 minutes, it seems to at least remove this occasional problem for me.  I suggest opening a bug and looking into the actually problem separately.  I don\u0027t want this unit tests to block me at the moment.","commit_id":"8c04da4aa0de53713dadfb31760551973e5921fc"}]}
