jgit/org.eclipse.jgit.junit.http
Thomas Wolf 559be66529 [tests] Stabilize the HTTP server's request log
The TestRequestLog added log entries only after a request had been
handled. But the response is already sent at that point, so the
following sequence was possible:

  client sends request A
  server thread T1 handles request A and sends back response
  client receives response
  client sends request B
  server thread T2 handles request B (and sends back response)
  server thread T2 logs B
  server thread T1 logs A

Fix this by logging events before handling a request, and then filling
in the response data after the request has been handled. This should
avoid such inversions, at least for tests using a single single-threaded
client. With multiple concurrent or multi-threaded clients, all bets
about the log order would be off anyway.

Bug: 528187
Change-Id: I99a46df17231fa7c4f75a8c37e2c14dc098c4e22
Signed-off-by: Thomas Wolf <twolf@apache.org>
2022-07-31 14:08:46 +02:00
..
.settings Enable compiler option --release 2021-09-29 17:13:01 +02:00
META-INF Prepare 6.3.0-SNAPSHOT builds 2022-06-07 01:02:10 +02:00
src/org/eclipse/jgit/junit/http [tests] Stabilize the HTTP server's request log 2022-07-31 14:08:46 +02:00
.classpath Bump minimum required Java version to 11 2021-09-29 17:12:12 +02:00
.gitignore Introduce http test bundle 2010-12-08 16:20:28 +01:00
.project Enforce the use of Java5 API:s only (with a few exceptions) 2011-12-16 01:01:36 +01:00
BUILD Bazel: Add fixes for --incompatible_load_java_rules_from_bzl 2019-09-07 15:36:11 +09:00
build.properties Fix line endings 2013-05-03 16:19:07 +02:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 6.3.0-SNAPSHOT builds 2022-06-07 01:02:10 +02:00