)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3b33b38345546ccc0fea8a40f0b6f09b0225a913","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Turn on logging for the request log test"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The request logger will not log unless it is enabled via"},{"line_number":10,"context_line":"adjusting the logger configuration. Under the nova tests"},{"line_number":11,"context_line":"this configuration was there by default. The placement tests need"},{"line_number":12,"context_line":"to set it explicitly."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I59b470b7bfe6741bd8d4ffe4cffbe2f28c847216"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_80b3309a","line":11,"range":{"start_line":10,"start_character":36,"end_line":11,"end_character":40},"updated":"2018-09-05 19:20:35.000000000","message":"I\u0027m guessing because of nova\u0027s usage of the StandardLogging in the base test class? Is placement not going to use a fixture like that as well?\n\nActually I guess it\u0027s not that, because test_middleware_writes_logs in nova is not using the base nova test class, it\u0027s using testtools.TestCase directly.\n\nSo was the logging enabled some other way in the nova tests?","commit_id":"c4a83cdca302f362756224bdac21d9f367dc5d13"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9aab6f07c8c97d71fc69b1a1e02fcc147033af59","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Turn on logging for the request log test"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The request logger will not log unless it is enabled via"},{"line_number":10,"context_line":"adjusting the logger configuration. Under the nova tests"},{"line_number":11,"context_line":"this configuration was there by default. The placement tests need"},{"line_number":12,"context_line":"to set it explicitly."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I59b470b7bfe6741bd8d4ffe4cffbe2f28c847216"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_43c5228d","line":11,"range":{"start_line":10,"start_character":36,"end_line":11,"end_character":40},"in_reply_to":"3f79a3b5_80b3309a","updated":"2018-09-05 19:31:01.000000000","message":"OK the answer is the test in nova was also broken, but nova leaks global config so that\u0027s why it worked. Running it in isolation with testtools shows it fails in nova the same way.\n\n(2:20:53 PM) mriedem: cdent: do you know what in nova was making this request log test work without the mock? https://review.openstack.org/#/c/599399/\n(2:22:16 PM) cdent: mriedem: just digging that up. I knew when I made that change but can\u0027t remember right now. Basically there\u0027s _loads_ of set up in nova/test.py and some of the fixtures that placement throws away as either unneeded or wanting to be explicit\n(2:22:19 PM) cdent: lemme see if I can find it\n(2:22:30 PM) mriedem: but this test isn\u0027t using the base nova test class\n(2:22:33 PM) mriedem: it\u0027s using testtools\n(2:24:05 PM) cdent: it happens as part of nova/tests/unit/conf_fixture, which calls nova.config.parse_args which sets logging defaults\n(2:24:16 PM) cdent: which controls what\u0027s \"enabled\"\n(2:24:25 PM) cdent: the oslo config fixture doesn\u0027t do that\n(2:24:40 PM) cdent: and the placement tests avoid establish generic config default is they can at all help it\n(2:24:50 PM) mriedem: yeah but test_middleware_writes_logs in nova doesn\u0027t use the nova conf fixture\n(2:24:53 PM) mriedem: as far as i can tell\n(2:25:25 PM) mriedem: maybe it works b/c of some global config?\n(2:26:05 PM) cdent: that\u0027s just where I was headed\n(2:26:15 PM) cdent: the nova conf fixture is very leaky\n(2:26:38 PM) cdent: so too is setting of logging defaults\n(2:26:48 PM) cdent: (which is what it would be in this case)\n(2:27:35 PM) cdent: so, in isolation one would except that test to fail sometimes in nova, but only in real isolation, which doesn\u0027t happen much when using stestr\n(2:27:40 PM) ***cdent tries it with testtools\n(2:28:28 PM) openstackgerrit: Merged openstack/placement master: Fix configuration handling in policy unit test  https://review.openstack.org/599398\n(2:29:30 PM) cdent: mriedem: yup: AssertionError: Expected \u0027write_log\u0027 to be called once. Called 0 times.\n(2:29:45 PM) cdent: (when using testtools)\n(2:30:18 PM) mriedem: ok","commit_id":"c4a83cdca302f362756224bdac21d9f367dc5d13"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"93cfc9ea495505fee058c8a1c03a1654e207698f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Turn on logging for the request log test"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The request logger will not log unless it is enabled via"},{"line_number":10,"context_line":"adjusting the logger configuration. Under the nova tests"},{"line_number":11,"context_line":"this configuration was there by default. The placement tests need"},{"line_number":12,"context_line":"to set it explicitly."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I59b470b7bfe6741bd8d4ffe4cffbe2f28c847216"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_83557ac4","line":11,"range":{"start_line":10,"start_character":36,"end_line":11,"end_character":40},"in_reply_to":"3f79a3b5_80b3309a","updated":"2018-09-05 19:31:54.000000000","message":"We\u0027ve established the test on which the mock was added was only ever working in nova because of global log configuration. If the test file is run in isolation using testtools, it fails with:\n\n    AssertionError: Expected \u0027write_log\u0027 to be called once. Called 0 times.\n\nShould we fix that?","commit_id":"c4a83cdca302f362756224bdac21d9f367dc5d13"}]}
