SOLR-9107: When creating a randomized SSL test config, 100% effective odds of using SSL and/or client auth should never be trumped by chance.

This commit is contained in:
Steve Rowe 2016-06-08 14:39:01 -04:00
parent 18ac2978a9
commit 86c053dd10
1 changed files with 2 additions and 2 deletions

View File

@ -105,9 +105,9 @@ public @interface RandomizeSSL {
// even if we know SSL is disabled, always consume the same amount of randomness
// that way all other test behavior should be consistent even if a user adds/removes @SuppressSSL
final boolean useSSL = TestUtil.nextInt(LuceneTestCase.random(), 0, 1000) <
final boolean useSSL = TestUtil.nextInt(LuceneTestCase.random(), 0, 999) <
(int)(1000 * getEffectiveOdds(ssl, LuceneTestCase.TEST_NIGHTLY, LuceneTestCase.RANDOM_MULTIPLIER));
final boolean useClientAuth = TestUtil.nextInt(LuceneTestCase.random(), 0, 1000) <
final boolean useClientAuth = TestUtil.nextInt(LuceneTestCase.random(), 0, 999) <
(int)(1000 * getEffectiveOdds(clientAuth, LuceneTestCase.TEST_NIGHTLY, LuceneTestCase.RANDOM_MULTIPLIER));
return new SSLTestConfig(useSSL, useClientAuth);