You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dr...@apache.org on 2016/06/09 04:59:28 UTC

[5/8] lucene-solr:SOLR-9191: 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.

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.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/86c053dd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/86c053dd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/86c053dd

Branch: refs/heads/SOLR-9191
Commit: 86c053dd1055c5b2b4cfe3c8e6b573d3d1272b24
Parents: 18ac297
Author: Steve Rowe <sa...@apache.org>
Authored: Wed Jun 8 14:39:01 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Wed Jun 8 14:39:01 2016 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/solr/util/RandomizeSSL.java              | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86c053dd/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java b/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
index e7336d8..2450dad 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
@@ -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);