Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix "Sporadic test failures in BPD tests #3309" #3330

Merged
merged 7 commits into from Jul 19, 2019

Commits on Jul 15, 2019

  1. fix "Sporadic test failures in BPD tests beetbox#3309"

    The bpd test bind a socket in order to test the protocol implementation. When
    running concurrently this often resulted in an attempt to bind an already
    occupied port.
    
    By using the port number `0` we instead let the OS choose a free port. We then
    have to extract it from the socket (which is handled by `bluelet`) via
    `mock.patch`ing.
    zsinskri committed Jul 15, 2019
    Copy the full SHA
    0ebab5e View commit details
    Browse the repository at this point in the history
  2. bpd test: make start_server a freestanding function

    Under some circumstances (maybe under MS Windows?) local objects can't be
    pickled. When `start_server` is a local this causes a crash:
    https://ci.appveyor.com/project/beetbox/beets/builds/25996163/job/rbp3frnkwsvbuwx6#L541
    
    Make `start_server` a freestanding function to mitigate this.
    zsinskri committed Jul 15, 2019
    Copy the full SHA
    bbda292 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2019

  1. Copy the full SHA
    fb07a51 View commit details
    Browse the repository at this point in the history
  2. bpd tests: close only existing sockets

    Close sockets in `finally`-clauses only after they have actually been created.
    zsinskri committed Jul 17, 2019
    Copy the full SHA
    871f79c View commit details
    Browse the repository at this point in the history
  3. bpd tests: use mp.Queue to communicate assigned port

    Use a `multiprocessing.Queue` instead of a `multiprocessing.Value` to avoid the
    manual polling/timeout handling.
    
    TODO: Strangely Listener seems to be constructed twice. Only the second one is
    used. Fix that and then remove the code working around it.
    zsinskri committed Jul 17, 2019
    Copy the full SHA
    8ba7911 View commit details
    Browse the repository at this point in the history
  4. bpd tests: skip control_port in queue

    When setting up bpd tests, two servers are startet: first a control server, then
    bpd. Both send their assigned ports down a queue. The recipient only needs bpd's
    port and thus skips the first queue entry.
    zsinskri committed Jul 17, 2019
    Copy the full SHA
    088af4d View commit details
    Browse the repository at this point in the history
  5. changelog: fix "Sporadic test failures in BPD tests beetbox#3309" bee…

    …tbox#3330
    
    Add a changelog entry asking plugin developers to report any further occurrences
    of this failure.
    zsinskri committed Jul 17, 2019
    Copy the full SHA
    5e5cb3c View commit details
    Browse the repository at this point in the history