)]}'
{"neutron_tempest_plugin/scenario/base.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"bef76d1f03d670785454a10818ba1df5d3cdf753","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        result \u003d test_utils.call_until_true(ping, timeout, 1)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        if should_succeed:"},{"line_number":345,"context_line":"            self.assertTrue(result)"},{"line_number":346,"context_line":"        else:"},{"line_number":347,"context_line":"            self.assertFalse(result)"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_1a015d05","line":345,"updated":"2019-03-04 20:09:18.000000000","message":"This is the correct approach to solve the bug IMO.\n\nThese 4 lines could be changed to:\nself.assertEqual(result, should_succeed).","commit_id":"fac66830f2431d88eb12a03df36057857c26e279"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"f15071828bab6d0081bbef43075690b138c5dd47","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        result \u003d test_utils.call_until_true(ping, timeout, 1)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        if should_succeed:"},{"line_number":345,"context_line":"            self.assertTrue(result)"},{"line_number":346,"context_line":"        else:"},{"line_number":347,"context_line":"            self.assertFalse(result)"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_65e00e28","line":345,"in_reply_to":"9fdfeff1_1a015d05","updated":"2019-03-04 21:00:04.000000000","message":"oh yes, couldn\u0027t think of it at first. thanks !","commit_id":"fac66830f2431d88eb12a03df36057857c26e279"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9cc6842799879bc8392480c4898beedd89a4b82f","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                                    stderr\u003dsubprocess.PIPE)"},{"line_number":331,"context_line":"            proc.communicate()"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            return (proc.returncode \u003d\u003d 0) \u003d\u003d should_succeed"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        caller \u003d test_utils.find_test_caller()"},{"line_number":336,"context_line":"        LOG.debug(\u0027%(caller)s begins to ping %(ip)s in %(timeout)s sec and the\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_9a6696ee","line":333,"range":{"start_line":333,"start_character":11,"end_line":333,"end_character":59},"updated":"2019-03-05 17:08:52.000000000","message":"IMO, this should just return if ping succeeded or not and\nassert down will take care of if it should pass or fail.\n\nin case its expected to fail\n\nproc.returncode \u003d\u003d 0 evaluates to false\nshould_succeed \u003d\u003d false and false \u003d\u003d false returns true\nand following assert not working for some cases","commit_id":"eeea494001fc96cb31876a1bf3a2969f7bf37089"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7a106094c6d25c2ab70189d1a110364d4da7105c","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                                    stderr\u003dsubprocess.PIPE)"},{"line_number":331,"context_line":"            proc.communicate()"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            return (proc.returncode \u003d\u003d 0)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        caller \u003d test_utils.find_test_caller()"},{"line_number":336,"context_line":"        LOG.debug(\u0027%(caller)s begins to ping %(ip)s in %(timeout)s sec and the\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_6315dd9b","line":333,"updated":"2019-03-13 22:01:16.000000000","message":"this is IMO wrong now because if You have \"should_succeed\u003d\u003dFalse\" then now You will return here false, so test will then timeout in L 342, am I right?","commit_id":"ed72dc7883b904ab715d22a2731c96289475ac2f"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"cebff1296709139c4e293dc9c500368e7c00bc8a","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                                    stderr\u003dsubprocess.PIPE)"},{"line_number":331,"context_line":"            proc.communicate()"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            return (proc.returncode \u003d\u003d 0)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        caller \u003d test_utils.find_test_caller()"},{"line_number":336,"context_line":"        LOG.debug(\u0027%(caller)s begins to ping %(ip)s in %(timeout)s sec and the\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_55d9641f","line":333,"in_reply_to":"5fc1f717_030090aa","updated":"2019-03-14 17:45:21.000000000","message":"I agree its race prone as I just noticed several runs of test using this fail or pass sometimes. I\u0027ll respin thanks !","commit_id":"ed72dc7883b904ab715d22a2731c96289475ac2f"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"e1ef6d075d769ceefd682870cd5db4a8c98da8d3","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                                    stderr\u003dsubprocess.PIPE)"},{"line_number":331,"context_line":"            proc.communicate()"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            return (proc.returncode \u003d\u003d 0)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        caller \u003d test_utils.find_test_caller()"},{"line_number":336,"context_line":"        LOG.debug(\u0027%(caller)s begins to ping %(ip)s in %(timeout)s sec and the\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_fe3c04c9","line":333,"in_reply_to":"5fc1f717_6315dd9b","updated":"2019-03-13 22:36:50.000000000","message":"actually this will just return if the ping worked or not, then assert at L346 will make sure it works as expected.\n\nhow would you assert otherwise suppose should_succeed \u003d false \n\nand when ping is supposed to fail proc.returncode \u003d\u003d 0 will be false\n\n(proc.returncode \u003d\u003d 0) \u003d\u003d should_succeed will return True\nFalse \u003d\u003d False ? in that scenario assert would not work.\n\n\nif L342 test_utils.call_until_true(ping, timeout, 1) doesn\u0027t return true in timeout it will return false http://git.openstack.org/cgit/openstack/tempest/tree/tempest/lib/common/utils/test_utils.py#n114\n\nor the other workaround is to add assert statements everwhere this assert_ping_ip is used.","commit_id":"ed72dc7883b904ab715d22a2731c96289475ac2f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7e2063466ba1166717147274ea0446f3d3b5de25","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                                    stderr\u003dsubprocess.PIPE)"},{"line_number":331,"context_line":"            proc.communicate()"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            return (proc.returncode \u003d\u003d 0)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        caller \u003d test_utils.find_test_caller()"},{"line_number":336,"context_line":"        LOG.debug(\u0027%(caller)s begins to ping %(ip)s in %(timeout)s sec and the\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_030090aa","line":333,"in_reply_to":"5fc1f717_fe3c04c9","updated":"2019-03-14 10:00:06.000000000","message":"You can do here:\n\n    return (proc.returncode \u003d\u003d 0) \u003d\u003d should_succeed\n\nand then in line 346:\n\n    self.assertTrue(result)\n\nIn the way like it is done now it probably is race condition prone. Imagine the case when should_succeed \u003d False and You applied some SG to the port and expect that it will block traffic. In such case if You go to L342 too fast and first ping will be fine, it will return True and Your assert in L346 will fail. And You will not wait 60 seconds to check if traffic was really blocked.\n\nSecond, small problem is that in case when You expect no connectivity and indeed there will be no connectivity, You will always continue checking that for 60 seconds even if that isn\u0027t necessary.\n\nAm I right with that or am I missing something here?","commit_id":"ed72dc7883b904ab715d22a2731c96289475ac2f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7a106094c6d25c2ab70189d1a110364d4da7105c","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        # to make sure ping_ip_address called by test works"},{"line_number":345,"context_line":"        # as expected"},{"line_number":346,"context_line":"        self.assertEqual(result, should_succeed)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        LOG.debug(\u0027%(caller)s finishes ping %(ip)s in %(timeout)s sec and the \u0027"},{"line_number":349,"context_line":"                  \u0027ping result is %(result)s\u0027, {"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_e3fa2d73","line":346,"updated":"2019-03-13 22:01:16.000000000","message":"we are using everywhere pattern:\n\n    self.assertEqual(expected, actual)","commit_id":"ed72dc7883b904ab715d22a2731c96289475ac2f"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"1d19edf80d1379efc64e67df0ce363b3881e2481","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        # To make sure ping_ip_address called by test works"},{"line_number":345,"context_line":"        # as expected."},{"line_number":346,"context_line":"        self.assertTrue(result)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        LOG.debug(\u0027%(caller)s finishes ping %(ip)s in %(timeout)s sec and the \u0027"},{"line_number":349,"context_line":"                  \u0027ping result is %(result)s\u0027, {"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_95b4ac81","line":346,"updated":"2019-03-14 17:59:53.000000000","message":"I think Slawek meant to reverse the order of the args to have expected first (should_succeed) and then actual (result), like the majority of other tests.","commit_id":"8bbf899ec0c1ce5a9a500d680dac2391b8149a96"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5b697421dbb6902233255c64066692115a09ad78","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        # To make sure ping_ip_address called by test works"},{"line_number":345,"context_line":"        # as expected."},{"line_number":346,"context_line":"        self.assertTrue(result)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        LOG.debug(\u0027%(caller)s finishes ping %(ip)s in %(timeout)s sec and the \u0027"},{"line_number":349,"context_line":"                  \u0027ping result is %(result)s\u0027, {"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_32ece18d","line":346,"in_reply_to":"5fc1f717_95b4ac81","updated":"2019-03-15 09:15:50.000000000","message":"That was my intention in previous PS where assertEqual was used. Now assertTrue is better.","commit_id":"8bbf899ec0c1ce5a9a500d680dac2391b8149a96"}]}
