You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Rahul Goswami <ra...@gmail.com> on 2022/06/07 02:29:18 UTC

Failing Solr tests during build

Hi,
I am trying to build Solr 8.11.1 on Windows (using GitBash). Most tests
execute fine, until I hit the S3 suite of testcases under
contrib/s3-repository with the below exception:

> Throwable #1: java.security.AccessControlException: *access denied
("java.io.FilePermission" "Z:\.aws\credentials" "read")*
   [junit4]    >        at
java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

I believe the test cases need an AWS account credentials file
(.aws\credentials) without which the test cases will fail ?

If this is true, how can I bypass these test cases?

There is also a gcs-repository module under contrib where I expect to hit
similar issues, so I believe I might have to bypass those as well (?).

Thanks,
Rahul

Re: Failing Solr tests during build

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/6/2022 8:29 PM, Rahul Goswami wrote:
> I am trying to build Solr 8.11.1 on Windows (using GitBash). Most tests
> execute fine, until I hit the S3 suite of testcases under
> contrib/s3-repository with the below exception:

You do not need to run tests to build Solr.  Running tests usually 
results in a failed build unless you do it several times in a row.

Assuming you have a very recent ant version in the PATH and a version 8 
or version 11 JDK installed that either is in the PATH or a JAVA_HOME 
environment variable, the following commands in git bash should produce 
you a usable package of version 8.11.2-SNAPSHOT:

git clone https://github.com/apache/lucene-solr.git
cd lucene-solr
git checkout branch_8_11
ant ivy-bootstrap
cd solr
ant clean package

The finished packages, very similar to what you can download, will be in 
the package subdirectory from the current working directory where the 
build finishes.

On my Windows 10 with Oracle JDK 11, the "ant clean package" command 
took 20 minutes 28 seconds to run, but the packages were available about 
seven minutes before the full build finished.

If you prefer to clone the repo directly from Apache rather than github, 
use the following URL, but be aware that the clone will be VERY slow:

https://gitbox.apache.org/repos/asf/lucene-solr.git

You can check out a different branch than branch_8_11 if you want to 
build a specific version rather than the most current 8.x available.

Thanks,
Shawn