)]}'
{"nova/tests/functional/notification_sample_tests/test_instance.py":[{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"2e49e81f8e51430a1e40b52c3be2375323364992","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        server \u003d self._boot_a_server("},{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["},{"line_number":42,"context_line":"            self._test_create_poweron_server,"},{"line_number":43,"context_line":"            self._test_delete_restore_server,"},{"line_number":44,"context_line":"            self._test_create_suspend_server,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_9b3434df","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":19},"updated":"2016-07-15 18:52:33.000000000","message":"nit : Not sure, but what if we declare actions list at class level ?","commit_id":"18f9ec80446a064399537ec3e1687cd49a7f6ec4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dbee6e1dd7e54272b129a4e1f30aa10c9123e45e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        server \u003d self._boot_a_server("},{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["},{"line_number":42,"context_line":"            self._test_create_poweron_server,"},{"line_number":43,"context_line":"            self._test_delete_restore_server,"},{"line_number":44,"context_line":"            self._test_create_suspend_server,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_d6903798","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":19},"in_reply_to":"fad55976_9b3434df","updated":"2016-07-18 11:48:14.000000000","message":"As this list only accessed by this single function I don\u0027t see the reason why this should be on class level.","commit_id":"18f9ec80446a064399537ec3e1687cd49a7f6ec4"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"c31dda7c97eeb77e1359a33ac47b0ca102c6ea64","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["},{"line_number":42,"context_line":"            self._test_create_poweron_server,"},{"line_number":43,"context_line":"            self._test_delete_restore_server,"},{"line_number":44,"context_line":"            self._test_create_suspend_server,"},{"line_number":45,"context_line":"            self._test_create_pause_server,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fad55976_517c6320","line":42,"updated":"2016-07-15 16:37:03.000000000","message":"should these names be renamed to _test_poweron_server, _test_suspend_server, etc since there isn\u0027t a create anymore","commit_id":"18f9ec80446a064399537ec3e1687cd49a7f6ec4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dbee6e1dd7e54272b129a4e1f30aa10c9123e45e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["},{"line_number":42,"context_line":"            self._test_create_poweron_server,"},{"line_number":43,"context_line":"            self._test_delete_restore_server,"},{"line_number":44,"context_line":"            self._test_create_suspend_server,"},{"line_number":45,"context_line":"            self._test_create_pause_server,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_b68dc37d","line":42,"in_reply_to":"fad55976_517c6320","updated":"2016-07-18 11:48:14.000000000","message":"Good point. I renamed them.","commit_id":"18f9ec80446a064399537ec3e1687cd49a7f6ec4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b2ea7fc23f357059a7f6b70709c3f3501ebd6b2b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # recovering from that action would mean to recreate the instance and"},{"line_number":36,"context_line":"        # that would go against the whole purpose of this optimization"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        server \u003d self._boot_a_server("},{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_63e0ce29","line":38,"updated":"2016-08-02 09:21:57.000000000","message":"Ah, found it:\nhttps://docs.python.org/2/library/unittest.html#unittest.TestCase.setUpClass\n\nI think we can do setUpClass and tearDownClass so each test method has access to the same server object.","commit_id":"d14fc79f65e04cc39a3988783344aecd84621291"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e02b41575e5fd13a6b40fe3a7e32f4eebf3effd9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # recovering from that action would mean to recreate the instance and"},{"line_number":36,"context_line":"        # that would go against the whole purpose of this optimization"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        server \u003d self._boot_a_server("},{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_fd48c18c","line":38,"in_reply_to":"bacf61ea_63e0ce29","updated":"2016-08-02 16:06:31.000000000","message":"The testtools\u0027 TestCase does not support useFixture at setUpClass time. This might be simulated by calling setUp() on the neutron fixture in the setUpClass but implementing a proper cleanup like addCleanup() in testtools would need extra effort. \n\nThe self.flags() would also need some change to be callable from setUpClass.\n\nHowever the bigger problem is that lot of test environment set up is implemented in the setUp of the nova.test.TestCase class. So if we want to reuse that for booting an instance during setUpClass then the whole base class setUp needs to be  moved to setUpClass which would need some serious work especially that the nova.testTestCase used every test case we have in nova.\n\nAlso I don\u0027t know how well it work if we start executing test cases in parallel against the same instance in functional env.","commit_id":"d14fc79f65e04cc39a3988783344aecd84621291"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d79d6a9a566555e244692ada5ffbc6813cc9e36f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # recovering from that action would mean to recreate the instance and"},{"line_number":36,"context_line":"        # that would go against the whole purpose of this optimization"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        server \u003d self._boot_a_server("},{"line_number":39,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        actions \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_0af8c97b","line":38,"in_reply_to":"bacf61ea_fd48c18c","updated":"2016-08-03 08:52:19.000000000","message":"Yeah, my bad, I hadn\u0027t thought about all that code we would have to throw out, lets go for this approach.","commit_id":"d14fc79f65e04cc39a3988783344aecd84621291"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e7dcbb3befa072d6a716b912da45b02379feec1d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        ]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        for action in actions:"},{"line_number":51,"context_line":"            fake_notifier.reset()"},{"line_number":52,"context_line":"            action(server)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def test_create_delete_server(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_2357f6ca","line":51,"updated":"2016-08-02 09:22:38.000000000","message":"PS, I think if the above goes in classSetUp, this could go in tearDown.","commit_id":"d14fc79f65e04cc39a3988783344aecd84621291"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"38d4b1a0369bafa532b84cfc143fa4a5b2a0bd62","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]},"},{"line_number":365,"context_line":"            actual\u003dfake_notifier.VERSIONED_NOTIFICATIONS[1])"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        self.flags(reclaim_instance_interval\u003d0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_030bd224","line":367,"updated":"2016-08-02 09:17:40.000000000","message":"I am wondering if there is a way to do this where the whole class shares some setup, rather than having to do this kind of thing.","commit_id":"d14fc79f65e04cc39a3988783344aecd84621291"}]}
