Skip to content

Commit

Permalink
Need fanout > 1 when more than 2 nodes.
Browse files Browse the repository at this point in the history
And restore faketime config to previous value, as that wasn't the right fix
  • Loading branch information
progval committed Nov 10, 2024
1 parent 827c6a6 commit 0dc5a0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion irctest/controllers/sable.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def certs_dir() -> Path:

NETWORK_CONFIG = """
{
"fanout": 1,
"fanout": 2,
"ca_file": "%(certs_dir)s/ca_cert.pem",
"peers": [
Expand Down
19 changes: 10 additions & 9 deletions irctest/server_tests/chathistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"""
Expand Down

0 comments on commit 0dc5a0f

Please sign in to comment.