-
Notifications
You must be signed in to change notification settings - Fork 355
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
GrizzlyHttpServerTest - testing stability with HTTP, HTTPS and HTTP/2 #4740
Conversation
- parallel execution on random free ports - disabled for jdk8 - possibility to use three different clients - jersey-client - but it doesn't support HTTP/2 - jdk11+ HttpClient - but it is not available in older JDK versions - jetty-client - but version compatible with jdk8 uses different classes than version compatible with jdk11 - each test creates a configured server, then creates several clients which are sending GET requests for given time. - all responses must be HTTP 200 - after the test then number of processed requests is written to the STDOUT - if there will be just one non compliant response, all clients are stopped and the test fails. - originally created to reproduce the issue #2125 of the Grizzly project, which used Jersey and Grizzly together. Signed-off-by: David Matějček <dmatej@seznam.cz>
BouncyCastle requires CQ, but it has a proprietary BouncyCastle license. Do we need the BouncyCastle? |
License should not be a problem: https://www.bouncycastle.org/fr/licence.html |
But maybe I can try to simplify it, basically I reused my older code. |
Aaargh, I deleted wrong repository by mistake ... so I have to create a new PR ... I think there is no other way to fix it. |
So, current state:
|
To create a self-signed cert, I think it's one of the only viable options. I typically use it too in tests like e.g. this: private static X509Certificate createSelfSignedCertificate(KeyPair keys) {
try {
Provider provider = new BouncyCastleProvider();
Security.addProvider(provider);
return new JcaX509CertificateConverter()
.setProvider(provider)
.getCertificate(
new X509v3CertificateBuilder(
new X500Name("CN=lfoo, OU=bar, O=kaz, L=zak, ST=lak, C=UK"),
ONE,
Date.from(now()),
Date.from(now().plus(1, DAYS)),
new X500Name("CN=lfoo, OU=bar, O=kaz, L=zak, ST=lak, C=UK"),
SubjectPublicKeyInfo.getInstance(keys.getPublic().getEncoded()))
.build(
new JcaContentSignerBuilder("SHA256WithRSA")
.setProvider(provider)
.build(keys.getPrivate())));
} catch (CertificateException | OperatorCreationException e) {
throw new IllegalStateException(e);
}
} As it's only used for testing, it would concern a "works with" CQ, which is far more relaxed. |
I expected you will create the request to approve using BouncyCastle in test dependencies, I don't have rights to do that ;) |
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.
CQs are RESOLVED, LGTM
Seems there is some bug on GitHub - I just rebased the branch to current eclipse/3.x branch, but now GitHub says that the repository was deleted, which is not true. There were no conflicts, I verified even that the version is still the same. Is it still possible to merge it, or should I create a new PR, same as this one? |
@dmatej as from my point of view (at GH) the PR still exists and can be merged (w/o conflicts), so no reason to change anything. |
which are sending GET requests for given time.