Esempio n. 1
0
def check_thrift_service(endpoint: EndpointConfiguration) -> None:
    pool = ThriftConnectionPool(endpoint, size=1, timeout=TIMEOUT)
    with pool.connection() as protocol:
        client = BaseplateService.Client(protocol)
        assert client.is_healthy(), "service indicated unhealthiness"
Esempio n. 2
0
def raw_thrift_client(endpoint):
    pool = ThriftConnectionPool(endpoint)
    with pool.connection() as client_protocol:
        yield TestService.Client(client_protocol)
Esempio n. 3
0
def raw_thrift_client(endpoint, client_spec):
    pool = ThriftConnectionPool(endpoint)
    with pool.connection() as client_protocol:
        yield client_spec.Client(client_protocol)
Esempio n. 4
0
def check_thrift_service(endpoint: EndpointConfiguration, probe: int) -> None:
    pool = ThriftConnectionPool(endpoint, size=1, timeout=TIMEOUT)
    with pool.connection() as protocol:
        client = BaseplateService.Client(protocol)
        assert client.is_healthy(request=IsHealthyRequest(
            probe=probe), ), "service indicated unhealthiness in probe {probe}"