summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.packaging
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-01-25 14:51:56 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-01-25 14:51:56 -0800
commitf2d5187ea1843c4ce3824874c145e1f40e4cff57 (patch)
tree019b8773cea2458648340fb9d757431a227b8748 /org.eclipse.jgit.packaging
parent6595ab10078690ed448b018383d4ecb538ff2a61 (diff)
downloadjgit-f2d5187ea1843c4ce3824874c145e1f40e4cff57.tar.gz
jgit-f2d5187ea1843c4ce3824874c145e1f40e4cff57.zip
Fix racy HTTP tests by waiting for requests to finish
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: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.packaging')
0 files changed, 0 insertions, 0 deletions