)]}'
{"neutron/tests/base.py":[{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"e5ffe1b4ba5f54168bd52a0e7a84581c6540dfa4","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @functools.wraps(f)"},{"line_number":151,"context_line":"    def func(self, *args, **kwargs):"},{"line_number":152,"context_line":"        # None means Timeout exception won\u0027t propagate"},{"line_number":153,"context_line":"        with self.assert_max_execution_time(max_execution_time\u003dNone):"},{"line_number":154,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":155,"context_line":"    return func"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_9da998e2","line":153,"updated":"2016-09-20 06:14:41.000000000","message":"This is cryptic. I think\n\ntry:\n    return f(...)\nexcept eventlet.timeout.Timeout:\n    foobar\n\nwould just do.","commit_id":"e1f8ffebdccdc2330dea871e728a5856a405b319"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fe8d7c30f71a27e2a84c1dd066e5da08ad6d6990","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @functools.wraps(f)"},{"line_number":151,"context_line":"    def func(self, *args, **kwargs):"},{"line_number":152,"context_line":"        # None means Timeout exception won\u0027t propagate"},{"line_number":153,"context_line":"        with self.assert_max_execution_time(max_execution_time\u003dNone):"},{"line_number":154,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":155,"context_line":"    return func"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_a478f490","line":153,"in_reply_to":"7a8ec9b2_9da998e2","updated":"2016-09-20 08:48:34.000000000","message":"I believe it\u0027s a matter of taste, isn\u0027t it?","commit_id":"e1f8ffebdccdc2330dea871e728a5856a405b319"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3d866960b51388f483a49225b3776d6c4cab0414","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":159,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":160,"context_line":"        super(TimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":161,"context_line":"        for name, method in inspect.getmembers("},{"line_number":162,"context_line":"                cls, predicate\u003dinspect.ismethod):"},{"line_number":163,"context_line":"            if name.startswith(\u0027test_\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_903b2f9c","line":160,"range":{"start_line":160,"start_character":14,"end_line":160,"end_character":30},"updated":"2016-09-20 10:16:46.000000000","message":"Shouldn\u0027t this be _CatchTimeoutMetaclass?","commit_id":"e1f8ffebdccdc2330dea871e728a5856a405b319"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c03dc8960b3bed6ef4c1b6694e0a656696ce370e","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":159,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":160,"context_line":"        super(TimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":161,"context_line":"        for name, method in inspect.getmembers("},{"line_number":162,"context_line":"                cls, predicate\u003dinspect.ismethod):"},{"line_number":163,"context_line":"            if name.startswith(\u0027test_\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_b0fd8b70","line":160,"range":{"start_line":160,"start_character":14,"end_line":160,"end_character":30},"in_reply_to":"7a8ec9b2_903b2f9c","updated":"2016-09-20 10:20:00.000000000","message":"Done","commit_id":"e1f8ffebdccdc2330dea871e728a5856a405b319"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"77203a8a2b989fd9941489f524c520eae1629542","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @functools.wraps(f)"},{"line_number":151,"context_line":"    def func(self, *args, **kwargs):"},{"line_number":152,"context_line":"        # None means Timeout exception won\u0027t propagate"},{"line_number":153,"context_line":"        with self.assert_max_execution_time(max_execution_time\u003dNone):"},{"line_number":154,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":155,"context_line":"    return func"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_eb7ba427","line":153,"range":{"start_line":153,"start_character":18,"end_line":153,"end_character":43},"updated":"2016-09-20 10:36:26.000000000","message":"It seems it doesn\u0027t work like this. As per documentation, the Timeout exception is raised and swallowed when exception is set to False, but it doesn\u0027t say it swallows the exception when it\u0027s raised from within the context. Look at http://paste.openstack.org/show/581904/\n\nI think we should go with the approach that Iwamoto proposed in previous PS.","commit_id":"acd65e0996b3b412b680f16df4d434fa3e297a9a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"13aa6a20e56908c67dd14e3e160c14b14993bdb7","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @functools.wraps(f)"},{"line_number":151,"context_line":"    def func(self, *args, **kwargs):"},{"line_number":152,"context_line":"        # None means Timeout exception won\u0027t propagate"},{"line_number":153,"context_line":"        with self.assert_max_execution_time(max_execution_time\u003dNone):"},{"line_number":154,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":155,"context_line":"    return func"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_b69f355e","line":153,"range":{"start_line":153,"start_character":18,"end_line":153,"end_character":43},"in_reply_to":"7a8ec9b2_eb7ba427","updated":"2016-09-20 13:55:08.000000000","message":"Oki. I also added a test case to validate the fix.","commit_id":"acd65e0996b3b412b680f16df4d434fa3e297a9a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"9c1e7f01a2838f6fe9b889ab1e3b5775129321f0","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def func(self, *args, **kwargs):"},{"line_number":152,"context_line":"        try:"},{"line_number":153,"context_line":"            return f(self, *args, **kwargs)"},{"line_number":154,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":155,"context_line":"            self.fail(\u0027Execution of this test timed out\u0027)"},{"line_number":156,"context_line":"    return func"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_24e00b96","line":154,"range":{"start_line":154,"start_character":15,"end_line":154,"end_character":39},"updated":"2016-09-21 13:08:10.000000000","message":"I\u0027m an optimistic person and I hope this exception also contains some valuable message, we could log it on the line below.","commit_id":"f7a1dec1362b6ea80eb48afe8e0cd15b4b75d408"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3a4ac57f9ac4b13f0805016a9998f7753203350f","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"},{"line_number":171,"context_line":"# makes the exception killing the whole worker, with all test cases scheduled"},{"line_number":172,"context_line":"# to it. This metaclass makes all test cases to convert Timeout exceptions into"},{"line_number":173,"context_line":"# unittest friendly failure mode (self.fail)."},{"line_number":174,"context_line":"@six.add_metaclass(_CatchTimeoutMetaclass)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_fab6be3c","line":171,"range":{"start_line":171,"start_character":2,"end_line":171,"end_character":29},"updated":"2016-09-21 13:27:17.000000000","message":"Nit: \"makes the exception killing\" -\u003e \"kills\"","commit_id":"f7a1dec1362b6ea80eb48afe8e0cd15b4b75d408"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3a4ac57f9ac4b13f0805016a9998f7753203350f","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"},{"line_number":171,"context_line":"# makes the exception killing the whole worker, with all test cases scheduled"},{"line_number":172,"context_line":"# to it. This metaclass makes all test cases to convert Timeout exceptions into"},{"line_number":173,"context_line":"# unittest friendly failure mode (self.fail)."},{"line_number":174,"context_line":"@six.add_metaclass(_CatchTimeoutMetaclass)"},{"line_number":175,"context_line":"class DietTestCase(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_7ac70e98","line":172,"range":{"start_line":172,"start_character":45,"end_line":172,"end_character":47},"updated":"2016-09-21 13:27:17.000000000","message":"Nit: remove \"to\"","commit_id":"f7a1dec1362b6ea80eb48afe8e0cd15b4b75d408"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b2290a89448aa2cdc223843ef5eb9fc3923887da","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return func"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_372d91a8","line":159,"range":{"start_line":159,"start_character":29,"end_line":159,"end_character":40},"updated":"2016-09-21 16:07:16.000000000","message":"I was wondering why is there ABCMeta, as we inherit from testtools.TestCase basically. So I tried it out and came to conclusion that someone else might be also wondering. So maybe it\u0027s worth to leave a comment here that we are masochists and use mixin classes with this DietTestCase and these mixin classes have ABCMeta metaclass.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aff7b05fd587e729b8c343bb5f2f14cb96f491cd","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return func"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_c02fe0f4","line":159,"range":{"start_line":159,"start_character":6,"end_line":159,"end_character":7},"updated":"2016-09-22 05:21:46.000000000","message":"Would it also be possible to make this class public?","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fbdd5f07093bc2cec67adb77e369688e7c008e28","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return func"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_31545853","line":159,"range":{"start_line":159,"start_character":6,"end_line":159,"end_character":7},"in_reply_to":"5a8bc5a2_c02fe0f4","updated":"2016-09-22 07:01:10.000000000","message":"Omer, why would I?","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1edc71d7db12afb0b94230921721c4935a60b3b0","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return func"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_7bc53f5a","line":159,"range":{"start_line":159,"start_character":29,"end_line":159,"end_character":40},"in_reply_to":"7a8ec9b2_372d91a8","updated":"2016-09-21 17:45:52.000000000","message":"OK, let me add that comment, even though I don\u0027t think it\u0027s of much interest for the future reader. It will work, why would the reader care? :)","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3565e45466a1adc074cb5c76432cb3f7df6da2ca","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return func"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_b4fcc83f","line":159,"range":{"start_line":159,"start_character":29,"end_line":159,"end_character":40},"in_reply_to":"7a8ec9b2_7bc53f5a","updated":"2016-09-22 11:51:43.000000000","message":"No need to respin because of this :)","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b2290a89448aa2cdc223843ef5eb9fc3923887da","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("},{"line_number":163,"context_line":"                # NOTE(ihrachys): we should use isroutine because it will catch"},{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_37c2f134","line":165,"range":{"start_line":162,"start_character":0,"end_line":165,"end_character":50},"updated":"2016-09-21 16:07:16.000000000","message":"Do we need to use inspect here? How about:\n\n for name, method in six.iteritems(dct):\n     if callable(method) and name.startswith(\u0027test_\u0027):\n         setattr(cls, name, _catch_timeout(method))","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e29f1696f8b7ea2d3f95d0331c8cc7ef206f662","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("},{"line_number":163,"context_line":"                # NOTE(ihrachys): we should use isroutine because it will catch"},{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_cc98a91e","line":165,"range":{"start_line":162,"start_character":0,"end_line":165,"end_character":50},"in_reply_to":"5a8bc5a2_f430100a","updated":"2016-09-23 11:17:07.000000000","message":"Classes are callable so I think isroutine is better.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1edc71d7db12afb0b94230921721c4935a60b3b0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("},{"line_number":163,"context_line":"                # NOTE(ihrachys): we should use isroutine because it will catch"},{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_bbd34737","line":165,"range":{"start_line":162,"start_character":0,"end_line":165,"end_character":50},"in_reply_to":"7a8ec9b2_37c2f134","updated":"2016-09-21 17:45:52.000000000","message":"I don\u0027t think yours is particularly better. I actually think that relying on a specialized function to inspect a class is less error prone than inspecting the dict itself.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3565e45466a1adc074cb5c76432cb3f7df6da2ca","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class _CatchTimeoutMetaclass(abc.ABCMeta):"},{"line_number":160,"context_line":"    def __init__(cls, name, bases, dct):"},{"line_number":161,"context_line":"        super(_CatchTimeoutMetaclass, cls).__init__(name, bases, dct)"},{"line_number":162,"context_line":"        for name, method in inspect.getmembers("},{"line_number":163,"context_line":"                # NOTE(ihrachys): we should use isroutine because it will catch"},{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_f430100a","line":165,"range":{"start_line":162,"start_character":0,"end_line":165,"end_character":50},"in_reply_to":"7a8ec9b2_bbd34737","updated":"2016-09-22 11:51:43.000000000","message":"The dct already contains all attributes of class, that\u0027s its purpose. inspect module is to inspect existing object. Though I don\u0027t think this really matters, if you prefer inspect, let\u0027s go that way.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"d452fabfd3b7e475444b084501dafd59ab6d5dcd","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_2d1cb076","line":167,"updated":"2016-09-23 09:32:19.000000000","message":"I wonder if this is an overkill to wrap every test function for the purpose.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cd5f14dcd9a3988cd296eece5a3aef954dabb89c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_e8f8f64b","line":167,"in_reply_to":"5a8bc5a2_081362b9","updated":"2016-09-23 09:35:59.000000000","message":"I don\u0027t like solutions that don\u0027t close regression gaps. Unless we prove that makes test run significantly longer, I better stick to a general approach.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"82964ce0a09c843c5050ede978207d8aeb3c22fd","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_081362b9","line":167,"in_reply_to":"5a8bc5a2_2d1cb076","updated":"2016-09-23 09:33:45.000000000","message":"Better be safe than sorry","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7e5c9c9515381c599eb190ee304a52b7fa319a17","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_d20f64df","line":167,"in_reply_to":"5a8bc5a2_6377a83a","updated":"2016-09-23 11:32:55.000000000","message":"\u003e Absence of this patch wouldn\u0027t cause regression as this bug\nOnly as long as every failure gets attention, which is not always the case for non-voting jobs like fullstack.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"357211b241f44dd79e7d4807a16dc83ce5b17d96","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_6377a83a","line":167,"in_reply_to":"5a8bc5a2_e8f8f64b","updated":"2016-09-23 09:59:55.000000000","message":"Absence of this patch wouldn\u0027t cause regression as this bug doesn\u0027t change SUCCESS/FAILURE statuses of CI jobs.\n\nI\u0027m not opposing to the patch (see no -1 on my review). Just IMHO.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e29f1696f8b7ea2d3f95d0331c8cc7ef206f662","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                # both unbound methods (python2) and functions (python3)"},{"line_number":165,"context_line":"                cls, predicate\u003dinspect.isroutine):"},{"line_number":166,"context_line":"            if name.startswith(\u0027test_\u0027):"},{"line_number":167,"context_line":"                setattr(cls, name, _catch_timeout(method))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"# Test worker cannot survive eventlet\u0027s Timeout exception, which effectively"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_376eba96","line":167,"in_reply_to":"5a8bc5a2_e8f8f64b","updated":"2016-09-23 11:17:07.000000000","message":"I agree. The job times for this patch don\u0027t seem out of the ordinary.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"}],"neutron/tests/unit/tests/test_base.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"1875719819335e342d9dd4aa812ef2a09787a600","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def test_catch_timeout(self):"},{"line_number":87,"context_line":"        try:"},{"line_number":88,"context_line":"            result \u003d self.MyTestCase().run()"},{"line_number":89,"context_line":"            self.assertFalse(result.wasSuccessful())"},{"line_number":90,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":91,"context_line":"            self.fail(\u0027Timeout escaped!\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_0177ee3a","line":89,"range":{"start_line":89,"start_character":12,"end_line":89,"end_character":52},"updated":"2016-09-22 14:50:37.000000000","message":"It\u0027d be nice to ensure that the failure contains the string message[1] but it seems like the result object(testtools.testresult.real.ExtendedToOriginalDecorator class) doesn\u0027t provide that information.\n\n[1] https://review.openstack.org/#/c/372552/10/neutron/tests/base.py@155","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b86fc04084ac2fd18ab40927c42818e218cbb474","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def test_catch_timeout(self):"},{"line_number":87,"context_line":"        try:"},{"line_number":88,"context_line":"            result \u003d self.MyTestCase().run()"},{"line_number":89,"context_line":"            self.assertFalse(result.wasSuccessful())"},{"line_number":90,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":91,"context_line":"            self.fail(\u0027Timeout escaped!\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_819f7e02","line":89,"range":{"start_line":89,"start_character":12,"end_line":89,"end_character":52},"in_reply_to":"5a8bc5a2_0177ee3a","updated":"2016-09-22 14:52:34.000000000","message":"We usually don\u0027t validate messages. It would be a test that fails after a legit change (for the message wording), which means a bad test in most cases.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"cb032aa9655e8bdc279732f7da583766c00cb391","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                              set(id(t) for (t, traceback) in result.failures))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class CatchTimeoutTestCase(base.DietTestCase):"},{"line_number":78,"context_line":"    # Embedded to hide from the regular test discovery"},{"line_number":79,"context_line":"    class MyTestCase(base.DietTestCase):"},{"line_number":80,"context_line":"        def test_case(self):"},{"line_number":81,"context_line":"            raise eventlet.timeout.Timeout()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        def runTest(self):"},{"line_number":84,"context_line":"            return self.test_case()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_catch_timeout(self):"},{"line_number":87,"context_line":"        try:"},{"line_number":88,"context_line":"            result \u003d self.MyTestCase().run()"},{"line_number":89,"context_line":"            self.assertFalse(result.wasSuccessful())"},{"line_number":90,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":91,"context_line":"            self.fail(\u0027Timeout escaped!\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_258320ce","line":91,"range":{"start_line":77,"start_character":0,"end_line":91,"end_character":41},"updated":"2016-09-22 12:35:53.000000000","message":"Could you explain how does it work?\nMy thinking:\nBuild fake TestCase class, with all tests running. Run tests, where one of these testts raises Timeout. It\u0027s understandable to me.\nBut then, I see `test_catch_timeout` which has try/except clause. You\u0027re catching Timeout exception. Does it mean, that initial modification just reraises Timeout? Is this `feature` of self.fail?","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"dc370a2bb473a395f43b86e6c792da60a17cf549","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                              set(id(t) for (t, traceback) in result.failures))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class CatchTimeoutTestCase(base.DietTestCase):"},{"line_number":78,"context_line":"    # Embedded to hide from the regular test discovery"},{"line_number":79,"context_line":"    class MyTestCase(base.DietTestCase):"},{"line_number":80,"context_line":"        def test_case(self):"},{"line_number":81,"context_line":"            raise eventlet.timeout.Timeout()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        def runTest(self):"},{"line_number":84,"context_line":"            return self.test_case()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_catch_timeout(self):"},{"line_number":87,"context_line":"        try:"},{"line_number":88,"context_line":"            result \u003d self.MyTestCase().run()"},{"line_number":89,"context_line":"            self.assertFalse(result.wasSuccessful())"},{"line_number":90,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":91,"context_line":"            self.fail(\u0027Timeout escaped!\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_a0063e1e","line":91,"range":{"start_line":77,"start_character":0,"end_line":91,"end_character":41},"in_reply_to":"5a8bc5a2_0068d2f4","updated":"2016-09-22 12:51:23.000000000","message":"Ack, thanks.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4c42911bfb894d89198a2eb8fd5b4ffef90b34b6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                              set(id(t) for (t, traceback) in result.failures))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class CatchTimeoutTestCase(base.DietTestCase):"},{"line_number":78,"context_line":"    # Embedded to hide from the regular test discovery"},{"line_number":79,"context_line":"    class MyTestCase(base.DietTestCase):"},{"line_number":80,"context_line":"        def test_case(self):"},{"line_number":81,"context_line":"            raise eventlet.timeout.Timeout()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        def runTest(self):"},{"line_number":84,"context_line":"            return self.test_case()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_catch_timeout(self):"},{"line_number":87,"context_line":"        try:"},{"line_number":88,"context_line":"            result \u003d self.MyTestCase().run()"},{"line_number":89,"context_line":"            self.assertFalse(result.wasSuccessful())"},{"line_number":90,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":91,"context_line":"            self.fail(\u0027Timeout escaped!\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_0068d2f4","line":91,"range":{"start_line":77,"start_character":0,"end_line":91,"end_character":41},"in_reply_to":"5a8bc5a2_258320ce","updated":"2016-09-22 12:50:07.000000000","message":"Yes, I catch the exception, and if it\u0027s actually caught, I claim failure for the code under test, because it\u0027s not expected.","commit_id":"e11102e42a26c31ed6606ddf3e7c83cff18dd52b"}]}
