chore(tests): Reduce flakiness due to MockServer websocket errors - #191
chore(tests): Reduce flakiness due to MockServer websocket errors#191adutra wants to merge 1 commit into
Conversation
Some test flakiness is happening lately, always related to MockServer and how it creates WebSockets. The flakiness seems to only affect macOS, CI runs fine. This PR attempts to mitigate the flakiness by tweaking some parameters heuristically: 1. Lower the number of expectations that require WebSockets 2. Lower the number of test permutations in OAuth2AgentTest 3. Increase some thread pool sizes for MockServer server and client 4. Explicitly clear all expectations before closing the server.
snazy
left a comment
There was a problem hiding this comment.
LGTM, but mind elaborating on the actual symptoms/reasons what's happening on macOS?
Unfortunately I didn't keep the stack traces 🤦♂️ The most frequent error is thrown from Let's leave this PR open for a few more days and I'll gather all the stack traces here. There is no rush. |
|
Oh, that's then Netty client related. I suspected the "usual random port stuff", which MockServer clearly implemented properly. |
|
Correct, and I'd also note that this project pushes MockServer to its limits, with a server-per-test pattern and lots of expectations in each test 😅 |
|
Another "interesting" observation: I rebooted my laptop yesterday I haven't seen any issues since 🤷♂️ |
|
There we go again 🙄 First stack trace of the day: |
"Have you tried to turn it off and on again" worked 🎉 |
|
Closing in favor of #205 . |
Some test flakiness is happening lately, always related to MockServer and how it creates WebSockets.
The flakiness seems to only affect macOS, CI runs fine.
This PR attempts to mitigate the flakiness by tweaking some parameters heuristically: