Make tests faster, by reducing timeout margins#516
Make tests faster, by reducing timeout margins#516fabianfett wants to merge 1 commit intoswift-server:mainfrom
Conversation
|
Nightly fails because of Sendable requirements. |
| tlsConfiguration: nil, | ||
| clientConfiguration: .init(proxy: .socksServer(host: "127.0.0.1", port: server!.localAddress!.port!)), | ||
| clientConfiguration: .init( | ||
| timeout: .init(connect: .seconds(3), read: nil), |
There was a problem hiding this comment.
Why do we use 3 seconds instead of 2 seconds here?
dnadoba
left a comment
There was a problem hiding this comment.
Great! This will decrease runtime significantly.
Nevertheless, I think the end goal should be to use an EmbeddedEventLoop in combination with advanceTime(to:). With that we should be able to reduce test time to a couple of milliseconds and make it independent of actual time passing.
While I agree in general, I'm not sure this actually works for integration tests. In all our unit tests, we should already be using |
9f4a366 to
09b14a3
Compare
09b14a3 to
05b9d9b
Compare
|
@swift-server-bot test please. |
|
@swift-server-bot test this please |
Motivation
We like fast tests. For this reason we enabled parallel testing recently. However there are a number of tests that have unnecessary high timeout margins. If we reduce those tests will be even faster.
Changes
Result
Faster and cleaner tests