Skip to content
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

Merged
merged 2 commits into from
Sep 2, 2022
Merged

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Sep 1, 2022

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.

Resolves #388.

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.
@Lukasa Lukasa added the semver/none No version bump required. label Sep 1, 2022
@Lukasa Lukasa requested a review from dnadoba September 1, 2022 11:57
Copy link
Member

@dnadoba dnadoba left a 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)
Copy link
Member

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.

Suggested change
super.init(connection: connection, shutdownTimeout: context.configuration.shutdownTimeout, additionalPeerCertificateVerificationCallback: nil, maxWriteSize: defaultMaxWriteSize)
super.init(connection: connection, shutdownTimeout: context.configuration.shutdownTimeout, additionalPeerCertificateVerificationCallback: nil)

Copy link
Contributor Author

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.

/// BoringSSL.
///
/// We have this default here instead of hardcoded into the software for testing purposes.
internal let defaultMaxWriteSize = Int(CInt.max)
Copy link
Member

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

@Lukasa Lukasa requested a review from dnadoba September 2, 2022 10:13
Copy link
Member

@FranzBusch FranzBusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Lukasa Lukasa merged commit 024bbd1 into apple:main Sep 2, 2022
@Lukasa Lukasa deleted the cb-back-off-extreme-tests branch September 2, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken test: NIOSSLIntegrationTest.testGiantWrite
3 participants