Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5814

go: Flaky test TestNoHangDuringStopFromClientNoDataSendDuringAcceptLoop

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.20.0
    • None
    • Go - Library
    • None

    Description

      Currently the TestNoHangDuringStopFromClientNoDataSendDuringAcceptLoop test in go library can be flaky (fails at roughly 1-in-100 chance)

      What this test does is roughly:

      1. Create a local server listening on a random local port (via localhost:0)
      2. Create a tcp client that connects to the server (via net.Dial) but does nothing after established the connection (so to server's PoV this is an idle client)
      3. Tries to shutdown the server
      4. Verifies that the shutting down of the server took at least the configured timeout, before server forcefully close idle client connections

      Step 4 can occasionally (rarely) fail because the server shutdown much faster than expected. I did some digging, the reason seems to be that the client-server tcp connection is broken after established (killed by the os or something?)

      So we need to find a way to keep the connection until server kills it to fix the flakiness of this test

      Attachments

        Activity

          People

            Unassigned Unassigned
            fishywang Yuxuan Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: