vert-x3 / vertx-web

HTTP web applications for Vert.x
Apache License 2.0
1.11k stars 535 forks source link

Fix flaky test by ensuring overlap of GET and POST #2670

Closed ljpengelen closed 4 weeks ago

ljpengelen commented 4 weeks ago

Motivation:

See test run for https://github.com/vert-x3/vertx-web/pull/2667.

This test succeeds when the handling of the GET request to /csrf/first is started before the POST request for /csrf/second. Without the change proposed in this PR, however, it may happen that the handling of the POST request starts before the handling of the GET request.

The test may succeed without the proposed change due to the order in which the statements are executed, but the order of the statements does not guarantee the order in which the requests are handled.