Skip to content

Commit 0dc5a0f

Browse files
committed
Need fanout > 1 when more than 2 nodes.
And restore faketime config to previous value, as that wasn't the right fix
1 parent 827c6a6 commit 0dc5a0f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

irctest/controllers/sable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def certs_dir() -> Path:
9595

9696
NETWORK_CONFIG = """
9797
{
98-
"fanout": 1,
98+
"fanout": 2,
9999
"ca_file": "%(certs_dir)s/ca_cert.pem",
100100
101101
"peers": [

irctest/server_tests/chathistory.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,9 @@ def _wait_before_chathistory(self):
868868
@cases.mark_specifications("Sable")
869869
@cases.mark_services
870870
class SablePostgresqlHistoryTestCase(_BaseChathistoryTests):
871-
# for every wall clock second, 10 seconds pass for the server.
872-
# At x15, sable_history does not always have time to persist messages (wtf?)
871+
# for every wall clock second, 15 seconds pass for the server.
873872
# at x30, links between nodes timeout.
874-
faketime = "+1y x10"
873+
faketime = "+1y x15"
875874

876875
@staticmethod
877876
def config() -> cases.TestCaseControllerConfig:
@@ -881,22 +880,24 @@ def config() -> cases.TestCaseControllerConfig:
881880
)
882881

883882
def _wait_before_chathistory(self):
884-
"""waits 15 seconds which appears to be a 1.5 min to Sable; which goes over
885-
the 1 min timeout for in-memory history"""
883+
"""waits 6 seconds which appears to be a 1.5 min to Sable; which goes over
884+
the 1 min timeout for in-memory history (+ 1 min because the cleanup job
885+
only runs every min)"""
886886
assert self.controller.faketime_enabled, "faketime is not installed"
887-
time.sleep(15)
887+
time.sleep(8)
888888

889889

890890
@cases.mark_specifications("Sable")
891891
@cases.mark_services
892892
class SableExpiringHistoryTestCase(cases.BaseServerTestCase):
893-
faketime = "+1y x10"
893+
faketime = "+1y x15"
894894

895895
def _wait_before_chathistory(self):
896896
"""waits 6 seconds which appears to be a 1.5 min to Sable; which goes over
897-
the 1 min timeout for in-memory history"""
897+
the 1 min timeout for in-memory history (+ 1 min because the cleanup job
898+
only runs every min)"""
898899
assert self.controller.faketime_enabled, "faketime is not installed"
899-
time.sleep(15)
900+
time.sleep(8)
900901

901902
def testChathistoryExpired(self):
902903
"""Checks that Sable forgets about messages if the history server is not available"""

0 commit comments

Comments
 (0)