From affdbf71aaee9e8f9b678592a523c68c8fcddb5a Mon Sep 17 00:00:00 2001 From: Alistair Coles Date: Mon, 17 Nov 2025 16:37:45 +0000 Subject: [PATCH] trivial: tests: add failure context to flakey assertion An object server unit test was seen to fail returning a 409 when a 204 was expected. I cannot see the bug, so this patch adds some failure context to add illumination if/when it fails again. Change-Id: I45327cb5a56a87b8f6b9e971232fdce3b3f4bcb8 Related-Bug: #2131684 Signed-off-by: Alistair Coles --- test/unit/obj/test_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py index 2dee1d0f46..0868b0f1cd 100644 --- a/test/unit/obj/test_server.py +++ b/test/unit/obj/test_server.py @@ -5614,7 +5614,8 @@ class TestObjectController(BaseTestCase): environ={'REQUEST_METHOD': 'DELETE'}, headers={'X-Timestamp': timestamp.internal}) resp = req.get_response(self.object_controller) - self.assertEqual(resp.status_int, 204) + self.assertEqual(resp.status_int, 204, + (start, orig_timestamp, timestamp)) objfile = os.path.join( self.testdir, 'sda1', storage_directory(diskfile.get_data_dir(POLICIES[0]), 'p',