Commit 9f894fb
authored
Fix intermittent failures in CI (#2928)
* Synchronize SockJSSession.register() to prevent concurrent handler invocation
When multiple verticle instances share the SockJS session map, register()
can be called concurrently from different event loop threads. The openWritten
field is a plain boolean with no memory visibility guarantee, so both threads
can read it as false and invoke the socket handler twice. Synchronize the
critical section on `this`, consistent with close().
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
* Fix intermittent failure in RouterTest on Windows
testDoNotUseSemicolonDelimiter closes then reopens the server on port 8080.
On Windows, TIME_WAIT delays port release causing bind failures. Use an
ephemeral port for the reopened server.
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
* Fix intermittent timeout in EventbusBridge testHookCreateSocketRejected
The TransportClient close handler can fire before the BridgeClient sets its
closeHandler callback via onSuccess, causing the close event to be silently
dropped. Track a pending close and replay it when the handler is set.
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
* Fix intermittent timeout in SockJSRawTransportTest
The server writes data immediately in the socket handler, but the data frame
can arrive at the client (in the same TCP segment as the handshake response)
before the frame handler is set. Have the server wait for a client message
before writing, so the frame handler is guaranteed to be in place.
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
---------
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>1 parent 164393d commit 9f894fb
4 files changed
Lines changed: 70 additions & 47 deletions
File tree
- vertx-web/src
- main/java/io/vertx/ext/web/handler/sockjs/impl
- test/java/io/vertx/ext/web/tests
- handler
- sockjs
Lines changed: 28 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
377 | 378 | | |
378 | | - | |
| 379 | + | |
379 | 380 | | |
380 | | - | |
| 381 | + | |
381 | 382 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
387 | 388 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3108 | 3108 | | |
3109 | 3109 | | |
3110 | 3110 | | |
3111 | | - | |
| 3111 | + | |
3112 | 3112 | | |
3113 | 3113 | | |
3114 | 3114 | | |
| |||
3124 | 3124 | | |
3125 | 3125 | | |
3126 | 3126 | | |
3127 | | - | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
3128 | 3132 | | |
3129 | 3133 | | |
3130 | 3134 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1399 | 1399 | | |
1400 | 1400 | | |
1401 | 1401 | | |
| 1402 | + | |
1402 | 1403 | | |
1403 | 1404 | | |
1404 | 1405 | | |
| |||
1422 | 1423 | | |
1423 | 1424 | | |
1424 | 1425 | | |
| 1426 | + | |
| 1427 | + | |
1425 | 1428 | | |
1426 | 1429 | | |
1427 | 1430 | | |
| |||
1434 | 1437 | | |
1435 | 1438 | | |
1436 | 1439 | | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1437 | 1444 | | |
1438 | 1445 | | |
1439 | 1446 | | |
| |||
1464 | 1471 | | |
1465 | 1472 | | |
1466 | 1473 | | |
| 1474 | + | |
1467 | 1475 | | |
1468 | 1476 | | |
1469 | 1477 | | |
| |||
1477 | 1485 | | |
1478 | 1486 | | |
1479 | 1487 | | |
| 1488 | + | |
| 1489 | + | |
1480 | 1490 | | |
1481 | 1491 | | |
1482 | 1492 | | |
| |||
1489 | 1499 | | |
1490 | 1500 | | |
1491 | 1501 | | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1492 | 1506 | | |
1493 | 1507 | | |
1494 | 1508 | | |
| |||
Lines changed: 22 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
143 | 150 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | | - | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
0 commit comments