From 859b48c491cf800078eecccddf495677c802aa43 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 21 Apr 2020 17:57:24 -0700 Subject: [PATCH] test_upload: Remove an erroneous nondeterministically correct check. See the comment added, but basically this test would fail if the two URLs were computed in different seconds. --- zerver/tests/test_upload.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_upload.py b/zerver/tests/test_upload.py index 37bd3e9d71..bacd891f5c 100644 --- a/zerver/tests/test_upload.py +++ b/zerver/tests/test_upload.py @@ -1646,8 +1646,10 @@ class S3Test(ZulipTestCase): data = result.json() url_only_url = data['url'] self.assertEqual(b"zulip!", urllib.request.urlopen(url_only_url).read().strip()) - # Verify the URLs are different. - self.assertEqual(url_only_url, redirect_url) + + # Note: Depending on whether the calls happened in the same + # second (resulting in the same timestamp+signature), + # url_only_url may or may not equal redirect_url. self.subscribe(self.example_user("hamlet"), "Denmark") body = "First message ...[zulip.txt](http://localhost:9991" + uri + ")"