You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/04/04 16:27:20 UTC
[07/14] lucene-solr:jira/solr-9959: SOLR-10338: Revert configure
SecureRandom non blocking for tests. (reverted from commit
0445f8200e0630e1bb8b7117f200529ed1259747)
SOLR-10338: Revert configure SecureRandom non blocking for tests. (reverted from commit 0445f8200e0630e1bb8b7117f200529ed1259747)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0bf7a5ff
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0bf7a5ff
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0bf7a5ff
Branch: refs/heads/jira/solr-9959
Commit: 0bf7a5ff335d2825a014862f5d04e70a7f5c016e
Parents: e872dc7
Author: Mark Miller <ma...@apache.org>
Authored: Mon Apr 3 22:00:08 2017 -0300
Committer: Mark Miller <ma...@apache.org>
Committed: Mon Apr 3 22:00:08 2017 -0300
----------------------------------------------------------------------
dev-tools/idea/.idea/workspace.xml | 2 +-
dev-tools/maven/pom.xml.template | 1 -
lucene/common-build.xml | 3 --
solr/CHANGES.txt | 2 -
.../test/SecureRandomAlgorithmTesterApp.java | 41 --------------------
.../java/org/apache/solr/SolrTestCaseJ4.java | 9 -----
6 files changed, 1 insertion(+), 57 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf7a5ff/dev-tools/idea/.idea/workspace.xml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/.idea/workspace.xml b/dev-tools/idea/.idea/workspace.xml
index e22108f..0ca7f0c 100644
--- a/dev-tools/idea/.idea/workspace.xml
+++ b/dev-tools/idea/.idea/workspace.xml
@@ -2,7 +2,7 @@
<project version="4">
<component name="RunManager" selected="JUnit.Lucene core">
<configuration default="true" type="JUnit" factoryName="JUnit">
- <option name="VM_PARAMETERS" value="-ea -Djava.security.egd=file:/dev/./urandom" />
+ <option name="VM_PARAMETERS" value="-ea" />
</configuration>
<configuration default="false" name="Lucene core" type="JUnit" factoryName="JUnit">
<module name="lucene-core-tests" />
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf7a5ff/dev-tools/maven/pom.xml.template
----------------------------------------------------------------------
diff --git a/dev-tools/maven/pom.xml.template b/dev-tools/maven/pom.xml.template
index 6b7f915..cd8d6b8 100644
--- a/dev-tools/maven/pom.xml.template
+++ b/dev-tools/maven/pom.xml.template
@@ -277,7 +277,6 @@
<tests.postingsformat>${tests.postingsformat}</tests.postingsformat>
<tests.timezone>${tests.timezone}</tests.timezone>
<tests.verbose>${tests.verbose}</tests.verbose>
- <java.security.egd>file:/dev/./urandom</java.security.egd>
</systemPropertyVariables>
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf7a5ff/lucene/common-build.xml
----------------------------------------------------------------------
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index aee7899..327a01d 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -1062,9 +1062,6 @@
<sysproperty key="tests.src.home" value="${user.dir}" />
- <!-- replaces default random source to the nonblocking variant -->
- <sysproperty key="java.security.egd" value="file:/dev/./urandom"/>
-
<!-- Only pass these to the test JVMs if defined in ANT. -->
<syspropertyset>
<propertyref prefix="tests.maxfailures" />
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf7a5ff/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c1a7503..8a5c3e8 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -180,8 +180,6 @@ Other Changes
* SOLR-10147: Admin UI -> Cloud -> Graph: Impossible to see shard state (Amrit Sarkar, janhoy)
-* SOLR-10338: Configure SecureRandom non blocking for tests. (Mihaly Toth, hossman, Ishan Chattopadhyaya, via Mark Miller)
-
* SOLR-10399: Generalize some internal facet logic to simplify points/non-points field handling (Adrien Grand, hossman)
* SOLR-7383: New DataImportHandler 'atom' example, replacing broken 'rss' example (Alexandre Rafalovitch)
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf7a5ff/solr/core/src/test/SecureRandomAlgorithmTesterApp.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/SecureRandomAlgorithmTesterApp.java b/solr/core/src/test/SecureRandomAlgorithmTesterApp.java
deleted file mode 100644
index 44f79e9..0000000
--- a/solr/core/src/test/SecureRandomAlgorithmTesterApp.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-public class SecureRandomAlgorithmTesterApp {
- public static void main(String[] args) throws NoSuchAlgorithmException {
- String algorithm = args[0];
- String method = args[1];
- int amount = Integer.valueOf(args[2]);
- SecureRandom secureRandom;
- if(algorithm.equals("default"))
- secureRandom = new SecureRandom();
- else
- secureRandom = SecureRandom.getInstance(algorithm);
- System.out.println("Algorithm:" + secureRandom.getAlgorithm());
- switch(method) {
- case "seed": secureRandom.generateSeed(amount); break;
- case "bytes": secureRandom.nextBytes(new byte[amount]); break;
- case "long": secureRandom.nextLong(); break;
- case "int": secureRandom.nextInt(); break;
- default: throw new IllegalArgumentException("Not supported random function: " + method);
- }
- System.out.println("SecureRandom function invoked");
- }
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf7a5ff/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index faf6707..0d4cedd 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -39,7 +39,6 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.security.SecureRandom;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
@@ -2439,14 +2438,6 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
}
}
- @BeforeClass
- public static void assertNonBlockingRandomGeneratorAvailable() {
- if(Boolean.parseBoolean(System.getProperty("test.solr.allow.any.securerandom","false")))
- return;
- // Use -Djava.security.egd=file:/dev/./urandom VM option if you hit this
- assertEquals("SHA1PRNG", new SecureRandom().getAlgorithm());
- }
-
@AfterClass
public static void unchooseMPForMP() {
System.clearProperty(SYSTEM_PROPERTY_SOLR_TESTS_USEMERGEPOLICYFACTORY);