From 0dc5a0fddac41edd4d8e3a52bcc962d858b243a0 Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Sun, 10 Nov 2024 18:52:07 +0100 Subject: [PATCH] Need fanout > 1 when more than 2 nodes. And restore faketime config to previous value, as that wasn't the right fix --- irctest/controllers/sable.py | 2 +- irctest/server_tests/chathistory.py | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/irctest/controllers/sable.py b/irctest/controllers/sable.py index e4a64008..271b079f 100644 --- a/irctest/controllers/sable.py +++ b/irctest/controllers/sable.py @@ -95,7 +95,7 @@ def certs_dir() -> Path: NETWORK_CONFIG = """ { - "fanout": 1, + "fanout": 2, "ca_file": "%(certs_dir)s/ca_cert.pem", "peers": [ diff --git a/irctest/server_tests/chathistory.py b/irctest/server_tests/chathistory.py index 9ee117a4..2a7a2a1a 100644 --- a/irctest/server_tests/chathistory.py +++ b/irctest/server_tests/chathistory.py @@ -868,10 +868,9 @@ def _wait_before_chathistory(self): @cases.mark_specifications("Sable") @cases.mark_services class SablePostgresqlHistoryTestCase(_BaseChathistoryTests): - # for every wall clock second, 10 seconds pass for the server. - # At x15, sable_history does not always have time to persist messages (wtf?) + # for every wall clock second, 15 seconds pass for the server. # at x30, links between nodes timeout. - faketime = "+1y x10" + faketime = "+1y x15" @staticmethod def config() -> cases.TestCaseControllerConfig: @@ -881,22 +880,24 @@ def config() -> cases.TestCaseControllerConfig: ) def _wait_before_chathistory(self): - """waits 15 seconds which appears to be a 1.5 min to Sable; which goes over - the 1 min timeout for in-memory history""" + """waits 6 seconds which appears to be a 1.5 min to Sable; which goes over + the 1 min timeout for in-memory history (+ 1 min because the cleanup job + only runs every min)""" assert self.controller.faketime_enabled, "faketime is not installed" - time.sleep(15) + time.sleep(8) @cases.mark_specifications("Sable") @cases.mark_services class SableExpiringHistoryTestCase(cases.BaseServerTestCase): - faketime = "+1y x10" + faketime = "+1y x15" def _wait_before_chathistory(self): """waits 6 seconds which appears to be a 1.5 min to Sable; which goes over - the 1 min timeout for in-memory history""" + the 1 min timeout for in-memory history (+ 1 min because the cleanup job + only runs every min)""" assert self.controller.faketime_enabled, "faketime is not installed" - time.sleep(15) + time.sleep(8) def testChathistoryExpired(self): """Checks that Sable forgets about messages if the history server is not available"""