On Mon, 17 May 2021 09:53:06 GMT, Julia Boes <jb...@openjdk.org> wrote:
> The tests for `afterHandler` filters expect the filter operation to happen > before the assertion. Very rarely this is not the case, the calling thread > reads the response before the filter operation is executed, so the test value > is not set before it is asserted. > This fix uses a `CompletableFuture` to ensure the test value has been updated > before it is asserted. > > While here, the change increases the thread-safety of the filter state of a > context. This pull request has now been integrated. Changeset: 894547d2 Author: Julia Boes <jb...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/894547d2c102dcbe1f9ec8a1edb11c6b31e4270e Stats: 31 lines in 3 files changed: 3 ins; 4 del; 24 mod 8266897: com/sun/net/httpserver/FilterTest.java fails intermittently with AssertionError Reviewed-by: chegar, dfuchs, michaelm ------------- PR: https://git.openjdk.java.net/jdk/pull/4050