Skip to content
  • Simon Redman's avatar
    Fix LanLinkProviderTest on Windows · c7579eb1
    Simon Redman authored
    ## Summary
    LanLinkProviderTest fails on Windows. This patch fixes that.
    
    I believe the root cause is that we are using a shared UDP socket to listen for identity broadcasts both in the LanLinkProvider and in the test. Apparently this works on Linux, but on Windows the LanLinkProvider picks up its own identity packet and pairs with itself.
    
    This patch gives a parameter to LanLinkProvider to allow it to listen and broadcast on different ports, then uses that ability in the test to make the test pass on Windows.
    
    ## Test Plan
    
    ### Before:
    lanlinkprovider test fails, first because it can't bind its UDP listener socket, and then because Windows seems to handle shared sockets differently than Linux, so the UDP broadcasts were not reaching the test's listener.
    
    ### After:
    lanlinkprovider test seems to pass reliably both in my Windows VM and in the CI
    c7579eb1