simonsobs / socs

Simons Observatory specific OCS agents.
BSD 2-Clause "Simplified" License
12 stars 12 forks source link

Support random availble port selection in DeviceEmulator #643

Open BrianJKoopman opened 3 months ago

BrianJKoopman commented 3 months ago

Description

This PR adds support for binding to a random available port when using the 'tcp' relay in the DeviceEmulator. This is now the default behavior. Tests that use this will need to grab the bound port via emulator.port to connect to.

Motivation and Context

This should fix the issue with flaky moxa tests seen in https://github.com/simonsobs/socs/pull/633.

How Has This Been Tested?

Tested locally with the modifications to the tests here.

Types of changes

Checklist:

BrianJKoopman commented 3 months ago

This doesn't actually solve the problem in #633, so I might hold off on merging.