mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-07 13:38:49 +00:00
Increase cache size to be on the safe side
This commit is contained in:
parent
8b0261c173
commit
6b23c05f2a
@ -146,7 +146,7 @@ final class CompressedCertificate {
|
||||
// the deflated certificate data in a memory cache statically and avoid
|
||||
// compressing local certificates repeatedly for every handshake.
|
||||
private static final Cache<CompCertCacheKey, byte[]> CACHE =
|
||||
Cache.newSoftMemoryCache(12);
|
||||
Cache.newSoftMemoryCache(92);
|
||||
|
||||
// Prevent instantiation of this class.
|
||||
private CompressedCertProducer() {
|
||||
|
||||
@ -91,10 +91,10 @@ public class CompressedCertMsgCache extends SSLSocketTemplate {
|
||||
assertEquals(1, countSubstringOccurrences(log,
|
||||
"Caching CompressedCertificate message"));
|
||||
|
||||
// Complete 12 handshakes, all with different certificates.
|
||||
// Complete 92 handshakes, all with different certificates.
|
||||
log = runAndGetLog(() -> {
|
||||
try {
|
||||
for (int i = 0; i < 12; i++) {
|
||||
for (int i = 0; i < 92; i++) {
|
||||
new CompressedCertMsgCache(
|
||||
"TLSv1.3", "EC", "SHA256withECDSA").run();
|
||||
}
|
||||
@ -102,8 +102,8 @@ public class CompressedCertMsgCache extends SSLSocketTemplate {
|
||||
}
|
||||
});
|
||||
|
||||
// Make sure all 12 CompressedCertificate messages are cached.
|
||||
assertEquals(12, countSubstringOccurrences(log,
|
||||
// Make sure all 92 CompressedCertificate messages are cached.
|
||||
assertEquals(92, countSubstringOccurrences(log,
|
||||
"Caching CompressedCertificate message"));
|
||||
|
||||
// Complete 1 handshake with the same certificate as the very first one.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user