-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove giant write test #398
Conversation
Motivation: The giant write test requires an enormous commitment of RAM to run it. This has caused problems for both our own CI and a number of downstream CI systems, leading to long execution times or outright failures. Unfortunately, we can't defend against the original failure using this test suite, but we can at least exercise the new machinery we added and trust that the configuration is right. Modifications: - Make the maximum write size configurable internally - Test the maximum write size at a different value. Result: We feel confident that the write splitting continues to work correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except some tiny nits. Thanks @Lukasa
@@ -86,7 +86,7 @@ public final class NIOSSLClientHandler: NIOSSLHandler { | |||
connection.setVerificationCallback(verificationCallback) | |||
} | |||
|
|||
super.init(connection: connection, shutdownTimeout: context.configuration.shutdownTimeout, additionalPeerCertificateVerificationCallback: nil) | |||
super.init(connection: connection, shutdownTimeout: context.configuration.shutdownTimeout, additionalPeerCertificateVerificationCallback: nil, maxWriteSize: defaultMaxWriteSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maxWriteSize
has the same default argument and therefore not needed here.
super.init(connection: connection, shutdownTimeout: context.configuration.shutdownTimeout, additionalPeerCertificateVerificationCallback: nil, maxWriteSize: defaultMaxWriteSize) | |
super.init(connection: connection, shutdownTimeout: context.configuration.shutdownTimeout, additionalPeerCertificateVerificationCallback: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is a call to super.init
, not to self.init
, so it doesn't actually have the default argument.
Sources/NIOSSL/NIOSSLHandler.swift
Outdated
/// BoringSSL. | ||
/// | ||
/// We have this default here instead of hardcoded into the software for testing purposes. | ||
internal let defaultMaxWriteSize = Int(CInt.max) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think it would be nicer if we make this a static property of NIOSSLHandler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Motivation:
The giant write test requires an enormous commitment of RAM to run it.
This has caused problems for both our own CI and a number of downstream
CI systems, leading to long execution times or outright failures.
Unfortunately, we can't defend against the original failure using this
test suite, but we can at least exercise the new machinery we added and
trust that the configuration is right.
Modifications:
Result:
We feel confident that the write splitting continues to work correctly.
Resolves #388.