JanusGraph / JanusGraph/janusgraph
Solr tests fail when run without Docker
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
While working on the TinkerPop 3.4.0 upgrade, I stumbled upon 3 Solr tests that are not working when executed without Solr in Docker:
```bash
mvn verify -pl :janusgraph-solr
```
which produces this output:
```bash
[ERROR] Failures:
[ERROR] SolrIndexKerberosKeytabTest.testSingleStoreFailsWhenPrincipalDoesntExist:81 Unexpected exception type thrown ==> expected: but was:
[ERROR] Errors:
[ERROR] SolrIndexKerberosKeytabTest.tearDownMiniCluster:61 » Krb Principal does not ex...
[ERROR] SolrIndexKerberosKeytabTest>IndexProviderTest.setUp:133 » PermanentBackend Per...
[INFO]
[ERROR] Tests run: 138, Failures: 1, Errors: 2, Skipped: 18
```
Detailed output:
```java
[ERROR] Tests run: 27, Failures: 1, Errors: 2, Skipped: 3, Time elapsed: 128.51 s <<< FAILURE! - in org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest
[ERROR] testSingleStoreFailsWhenPrincipalDoesntExist Time elapsed: 3.81 s <<< FAILURE!
org.opentest4j.AssertionFailedError: Unexpected exception type thrown ==> expected: but was:
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.testSingleStoreFailsWhenPrincipalDoesntExist(SolrIndexKerberosKeytabTest.java:81)
Caused by: org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.lambda$testSingleStoreFailsWhenPrincipalDoesntExist$1(SolrIndexKerberosKeytabTest.java:84)
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.testSingleStoreFailsWhenPrincipalDoesntExist(SolrIndexKerberosKeytabTest.java:81)
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Could not successfully complete backend operation due to repeated temporary exceptions after PT2S
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.lambda$testSingleStoreFailsWhenPrincipalDoesntExist$1(SolrIndexKerberosKeytabTest.java:84)
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.testSingleStoreFailsWhenPrincipalDoesntExist(SolrIndexKerberosKeytabTest.java:81)
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Unable to complete query on Solr.
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.lambda$testSingleStoreFailsWhenPrincipalDoesntExist$1(SolrIndexKerberosKeytabTest.java:84)
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.testSingleStoreFailsWhenPrincipalDoesntExist(SolrIndexKerberosKeytabTest.java:81)
Caused by: org.apache.solr.client.solrj.impl.CloudSolrClient$RouteException:
Error from server at http://127.0.0.1:39227/solr/vertex_shard1_replica_n1: Expected mime type application/octet-stream but got text/html.
Error 401
HTTP ERROR: 401
Problem accessing /solr/vertex_shard1_replica_n1/update. Reason:
Authentication required
Powered by Jetty:// 9.3.14.v20161028
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.lambda$testSingleStoreFailsWhenPrincipalDoesntExist$1(SolrIndexKerberosKeytabTest.java:84)
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.testSingleStoreFailsWhenPrincipalDoesntExist(SolrIndexKerberosKeytabTest.java:81)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Error from server at http://127.0.0.1:39227/solr/vertex_shard1_replica_n1: Expected mime type application/octet-stream but got text/html.
Error 401
HTTP ERROR: 401
Problem accessing /solr/vertex_shard1_replica_n1/update. Reason:
Authentication required
Powered by Jetty:// 9.3.14.v20161028
[ERROR] testSingleStoreFailsWhenKeytabIsMissing Time elapsed: 0.205 s <<< ERROR!
org.janusgraph.diskstorage.PermanentBackendException: Permanent failure in storage backend
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Error from server at http://127.0.0.1:39227/solr/edge: Expected mime type application/octet-stream but got text/html.
Error 401
HTTP ERROR: 401
Problem accessing /solr/edge/update. Reason:
Authentication required
Powered by Jetty:// 9.3.14.v20161028
[ERROR] org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest Time elapsed: 1.868 s <<< ERROR!
org.apache.kerby.kerberos.kerb.KrbException: Principal does not exist.
at org.janusgraph.diskstorage.solr.SolrIndexKerberosKeytabTest.tearDownMiniCluster(SolrIndexKerberosKeytabTest.java:61)
```
Since we are only executing the tests on Travis with Docker enabled for Solr, we don't run into this problem there.
Contributor guide
Research direction
Start with the janusgraph-solr module and run `mvn verify -pl :janusgraph-solr` without Docker. Inspect SolrIndexKerberosKeytabTest, especially testSingleStoreFailsWhenPrincipalDoesntExist, testSingleStoreFailsWhenKeytabIsMissing, and tearDownMiniCluster. Done means these tests pass when Solr is not running in Docker, without the reported exception and cleanup failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100