From c88441800a17c3526a9d360b4ccaca482063eac0 Mon Sep 17 00:00:00 2001 From: Elton Cardoso do Nascimento <43186596+EltonCN@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:07:24 -0300 Subject: [PATCH] Fix tests --- .github/workflows/test.yml | 5 ++++- src/cst_python/memory_storage/logical_time.py | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 86b5cf4..38d8e2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,10 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 - + ports: + # Maps port 6379 on service container to the host + - 6379:6379 + steps: - uses: actions/checkout@v2 diff --git a/src/cst_python/memory_storage/logical_time.py b/src/cst_python/memory_storage/logical_time.py index 7e84bd9..86e835e 100644 --- a/src/cst_python/memory_storage/logical_time.py +++ b/src/cst_python/memory_storage/logical_time.py @@ -3,7 +3,6 @@ import abc import functools -from typing import Self class LogicalTime(abc.ABC): @@ -23,7 +22,7 @@ def from_str(cls, string:str) -> "LogicalTime": @classmethod @abc.abstractmethod - def syncronize(cls, time0:Self, time1:Self) -> "LogicalTime": + def syncronize(cls, time0, time1) -> "LogicalTime": ... @abc.abstractmethod @@ -77,7 +76,7 @@ def from_str(cls, string:str) -> "LamportTime": return LamportTime(int(string)) @classmethod - def syncronize(cls, time0:Self, time1:Self) -> "LamportTime": + def syncronize(cls, time0, time1) -> "LamportTime": new_time = 0 if time0 < time1: new_time = time1._time