Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

XP-119 Fix gRPC testing setup so that it can run on macOS #217

Merged
merged 3 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ def participant_stub():
channel = grpc.insecure_channel("localhost:50051")
stub = coordinator_pb2_grpc.CoordinatorStub(channel)

return stub
yield stub

channel.close()
13 changes: 0 additions & 13 deletions tests/test_grpc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""XAIN FL tests for gRPC coordinator"""

from concurrent import futures
import sys
import threading
from unittest import mock

Expand Down Expand Up @@ -30,17 +29,6 @@
from xain_fl.coordinator.participants import Participants


# TODO: it should be fixed with: https://xainag.atlassian.net/browse/XP-119
# Some grpc tests fail on macos.
# `pytestmark` when defined on a module will mark all tests in that module.
# For more information check
# http://doc.pytest.org/en/latest/skipping.html#skip-all-test-functions-of-a-class-or-module
if sys.platform == "darwin":
pytestmark = pytest.mark.xfail( # pylint: disable=invalid-name
reason="some grpc tests fail on macos"
)


@pytest.mark.integration
def test_greeter_server(greeter_server): # pylint: disable=unused-argument
"""[summary]
Expand Down Expand Up @@ -82,7 +70,6 @@ def test_participant_rendezvous_accept( # pylint: disable=unused-argument
assert reply.response == coordinator_pb2.RendezvousResponse.ACCEPT


# TODO(XP-119): Fix test so it also runs correctly on macos
@pytest.mark.integration
def test_participant_rendezvous_later(participant_stub):
"""[summary]
Expand Down