Skip to content

Commit

Permalink
Merge pull request #522 from golemfactory/km/bump-goth-0.5
Browse files Browse the repository at this point in the history
Update goth to 0.5+
  • Loading branch information
kmazurek authored Jul 6, 2021
2 parents c97783a + f64907c commit a8a9654
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ colorama = "^0.4.4"
# It will be then installable with `poetry install -E integration-tests`.
# Note that putting `goth` in `poetry.dev-dependencies` instead of `poetry.dependencies`
# would not work: see https://github.com/python-poetry/poetry/issues/129.
goth = { version = "^0.4", optional = true, python = "^3.8.0" }
goth = { version = "^0.5", optional = true, python = "^3.8.0" }
Deprecated = "^1.2.12"
python-statemachine = "^0.8.0"

Expand Down
2 changes: 1 addition & 1 deletion tests/goth/test_instance_restart/requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def main():


if __name__ == "__main__":

now = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
enable_default_logger(
log_file=f"test-instance-restart-{now}.log",
debug_activity_api=True,
Expand Down
9 changes: 3 additions & 6 deletions tests/goth/test_instance_restart/test_instance_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,15 @@ async def test_instance_restart(project_dir: Path, log_dir: Path, config_overrid

# The first attempt to create an instance should fail
await cmd_monitor.wait_for_pattern(
".*INFO yapapi\.services\] .* comissioned$", timeout=60
r".*INFO yapapi\.services\] .* commissioned$", timeout=60
)
await cmd_monitor.wait_for_pattern(".*CommandExecutionError", timeout=20)
await cmd_monitor.wait_for_pattern(
".*INFO yapapi\.services\] .* decomissioned$", timeout=20
r".*INFO yapapi\.services\] .* decommissioned$", timeout=20
)
# The second one should succeed
await cmd_monitor.wait_for_pattern(
".*INFO yapapi\.services\] .* comissioned$", timeout=30
r".*INFO yapapi\.services\] .* commissioned$", timeout=30
)
await cmd_monitor.wait_for_pattern("STARTING$", timeout=20)
await cmd_monitor.wait_for_pattern("RUNNING$", timeout=20)
await cmd_monitor.wait_for_pattern(
".*INFO yapapi\.services\] .* decomissioned$", timeout=20
)
6 changes: 3 additions & 3 deletions tests/goth/test_run_yacat.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ async def test_run_yacat(log_dir: Path, project_dir: Path, config_overrides) ->
all_sent = cmd_monitor.add_assertion(assert_all_tasks_started)
all_computed = cmd_monitor.add_assertion(assert_all_tasks_computed)

await cmd_monitor.wait_for_pattern(".*Received proposals from 2", timeout=10)
logger.info("Received proposals")

await cmd_monitor.wait_for_pattern(
f".*The keyspace size is {EXPECTED_KEYSPACE_SIZE}", timeout=120
)
logger.info("Keyspace found")

await cmd_monitor.wait_for_pattern(".*Received proposals from 2", timeout=10)
logger.info("Received proposals")

await all_sent.wait_for_result(timeout=30)
logger.info("All tasks sent")

Expand Down
2 changes: 1 addition & 1 deletion yapapi/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def change_state(event: Union[ControlSignal, ExcInfo] = (None, None, None)) -> N
except asyncio.CancelledError:
pass

logger.info("%s decomissioned", instance.service)
logger.info("%s decommissioned", instance.service)

async def spawn_instance(self) -> None:
"""Spawn a new service instance within this Cluster.
Expand Down

0 comments on commit a8a9654

Please sign in to comment.