Skip to content
Snippets Groups Projects
  1. Feb 03, 2010
  2. Jan 25, 2010
    • Shawn Pearce's avatar
      Fix racy HTTP tests by waiting for requests to finish · f2d5187e
      Shawn Pearce authored
      
      Ensure the background Jetty threads have been able to write the
      request log record before the JUnit thread tries to read the set
      of requests back.  This wait is necessary because the JUnit thread
      may be able to continue as soon as Jetty has finished writing
      the response onto the socket, and hasn't necessarily finished the
      post-response logging activity.
      
      By using a semaphore with a fixed number of resources, and using
      one resource per request, but all of them when we want to read the
      log, we implement a simple lock that requires there be no active
      requests when we want to get the log from the JUnit thread.
      
      Change-Id: I499e1c96418557185d0e19ba8befe892f26ce7e4
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      f2d5187e
  3. Jan 23, 2010
  4. Jan 12, 2010
Loading