Bill commented on a change in pull request #7449: URL: https://github.com/apache/geode/pull/7449#discussion_r836852172
########## File path: geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/P2PMessagingConcurrencyDUnitTest.java ########## @@ -70,28 +77,74 @@ @RunWith(GeodeParamsRunner.class) public class P2PMessagingConcurrencyDUnitTest { - // how many messages will each sender generate? - private static final int MESSAGES_PER_SENDER = 1_000; + // how many sending member JVMs + private static final int SENDERS = 1; - // number of concurrent (sending) tasks to run - private static final int SENDER_COUNT = 10; + // number of concurrent (sending) tasks to run in each sending JVM + private static final int TASKS_PER_SENDER = 10; - // (exclusive) upper bound of random message size, in bytes - private static final int LARGEST_MESSAGE_BOUND = 32 * 1024 + 2; // 32KiB + 2 + // how many messages will each sending task generate? + private static final int MESSAGES_PER_SENDING_TASK = 1_000; + + /* + * Upper bound (exclusive) of random message size, in bytes. + * The magnitude is chosen to give us a mix of messages around + * 16KB. I want a number that results in a largest message that + * is not a power of two since I believe, for no particular reason, + * that it might catch more bugs than a power of two would, + * so I add 2. + */ + private static final int LARGEST_MESSAGE_BOUND = 32 * 1024 + 2; + + /* + * Non-random payload content makes debugging easier when a NULL cipher is used. + * Null ciphers are not allowed on TLSv1.3 though. + */ + private static boolean RANDOMIZE_PAYLOAD_CONTENT = true; + + private static final byte[] NON_RANDOM_PAYLOAD_PATTERN = + "EVERYGOODBOYDOESFINE".getBytes(StandardCharsets.UTF_8); // random seed private static final int RANDOM_SEED = 1234; + /* + * On TLSv1.3 using a GCM-based cipher, a KeyUpdate TLS message will be sent + * after a preconfigured number of bytes have been encrypted by an SSLEngine. + * Setting this to true causes generation of KeyUpdate TLS messages. + * See NioSslEngineKeyUpdateTest for more details. + * + * Leave this turned off for CI since ENCRYPTED_BYTES_LIMIT is + * performance-sensitive. Turning it on in CI can make this test flaky. + */ + private static final boolean TEST_WITH_TLS_KEY_UPDATE_MESSAGE_PROCESSING = false; Review comment: In the context of a DUnit test, there is a lot of TLS communication going on, besides just P2P messaging. But the `jdk.tls.keyLimits` affects them all. So in a DUnit test like this, the encryption limit setting has to be large enough so that e.g. locator communications (non-P2P comms) succeeds. But we want the byte limit small enough so the test fails soon. The number of bytes that each non-P2P TLS session will need to transfer before P2P messaging starts (and then fails) will vary in a range. That range is determined by the resources (hosts/cpus/networks). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org