Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 committed Mar 27, 2024
1 parent ee6b8f1 commit 33bd909
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/py/flwr/server/superlink/state/sqlite_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ def create_node(self) -> int:
# Sample a random int64 as node_id
node_id: int = int.from_bytes(os.urandom(8), "little", signed=True)

query = "INSERT INTO node (node_id, online_until, ping_interval) VALUES (?, ?)"
query = (
"INSERT INTO node (node_id, online_until, ping_interval) VALUES (?, ?, ?)"
)

try:
# Default ping interval is 30s
Expand Down
4 changes: 2 additions & 2 deletions src/py/flwr/server/superlink/state/state_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def test_initialize(self) -> None:
result = state.query("SELECT name FROM sqlite_schema;")

# Assert
assert len(result) == 9
assert len(result) == 10


class SqliteFileBasedTest(StateTest, unittest.TestCase):
Expand All @@ -522,7 +522,7 @@ def test_initialize(self) -> None:
result = state.query("SELECT name FROM sqlite_schema;")

# Assert
assert len(result) == 9
assert len(result) == 10


if __name__ == "__main__":
Expand Down

0 comments on commit 33bd909

Please sign in to comment.