Skip to content
Snippets Groups Projects
  • Yaroslav Dynnikov's avatar
    46eaf810
    fix: test running on macos · 46eaf810
    Yaroslav Dynnikov authored
    Pytest supports running tests in parallel using the `xdist` plugin. In
    order to support it in Picodata, one should avoid ports collision. It
    assigns each worker a dedicated IP address `127.7.n.1`, where
    `n = xdist_worker_number`. Unfortunately, it doesn't work on MacOS,
    because Mac doesn't provide any loopback aliases except `127.0.0.1`
    by default.
    
    This patch provides another address generation logics. The `subnet`
    parameter is superseeded with a `base_port`, that is `3300 + n * 100`.
    In this way, every pytest (xdist) worker gets a dedicated port range
    `[3301, 3399]`, `[3401, 3499]` and so on.
    
    Close https://git.picodata.io/picodata/picodata/picodata/-/issues/65
    46eaf810
    History
    fix: test running on macos
    Yaroslav Dynnikov authored
    Pytest supports running tests in parallel using the `xdist` plugin. In
    order to support it in Picodata, one should avoid ports collision. It
    assigns each worker a dedicated IP address `127.7.n.1`, where
    `n = xdist_worker_number`. Unfortunately, it doesn't work on MacOS,
    because Mac doesn't provide any loopback aliases except `127.0.0.1`
    by default.
    
    This patch provides another address generation logics. The `subnet`
    parameter is superseeded with a `base_port`, that is `3300 + n * 100`.
    In this way, every pytest (xdist) worker gets a dedicated port range
    `[3301, 3399]`, `[3401, 3499]` and so on.
    
    Close https://git.picodata.io/picodata/picodata/picodata/-/issues/65