e363904af067de1beac98313c0a6f8362980d406,distributed/tests/test_worker.py,,test_service_hosts_match_worker,#Any#,925

Before Change


    pytest.importorskip("bokeh")
    from distributed.bokeh.worker import BokehWorker
    services = {("bokeh", 0): BokehWorker}
    for host in ["tcp://0.0.0.0", "tcp://127.0.0.2"]:
        w = Worker(s.address, services=services)
        yield w._start(host)

        sock = first(w.services["bokeh"].server._http._sockets.values())
        assert sock.getsockname()[0] == host.split("://")[1]
        yield w._close()


@gen_test()
def test_scheduler_file():
    with tmpfile() as fn:
        s = Scheduler(scheduler_file=fn)

After Change


    assert sock.getsockname()[0] in ("::", "0.0.0.0")
    yield w._close()

    w = Worker(s.address, services={("bokeh", ":0"): BokehWorker})
    yield w._start("tcp://127.0.0.1")
    sock = first(w.services["bokeh"].server._http._sockets.values())
    assert sock.getsockname()[0] in ("::", "0.0.0.0")
    yield w._close()

    w = Worker(s.address, services={("bokeh", 0): BokehWorker})
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: dask/distributed
Commit Name: e363904af067de1beac98313c0a6f8362980d406
Time: 2019-04-09
Author: mrocklin@gmail.com
File Name: distributed/tests/test_worker.py
Class Name:
Method Name: test_service_hosts_match_worker


Project Name: dask/distributed
Commit Name: e363904af067de1beac98313c0a6f8362980d406
Time: 2019-04-09
Author: mrocklin@gmail.com
File Name: distributed/tests/test_scheduler.py
Class Name:
Method Name: test_service_hosts


Project Name: OpenMined/Grid
Commit Name: 92bb41035940965a436897f16294b6b563117efc
Time: 2021-02-21
Author: ionesiojr@gmail.com
File Name: apps/domain/src/main/core/services/infra_service.py
Class Name:
Method Name: get_workers_msg