You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dsmiley (via GitHub)" <gi...@apache.org> on 2024/02/28 15:25:14 UTC
[PR] Tests: JettyConfig.Builder.sslConfig now self inits [solr]
dsmiley opened a new pull request, #2318:
URL: https://github.com/apache/solr/pull/2318
-- from SolrTestCaseJ4.sslConfig. Instead of creator of JettyConfig remembering to set this all over the place. Don't need SolrTestCaseJ4.buildJettyConfig()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Tests: JettyConfig.Builder.sslConfig now self inits [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #2318:
URL: https://github.com/apache/solr/pull/2318#discussion_r1506343979
##########
solr/test-framework/src/java/org/apache/solr/embedded/JettyConfig.java:
##########
@@ -84,9 +86,14 @@ public static class Builder {
Long waitForLoadingCoresToFinishMs = 300000L;
Map<ServletHolder, String> extraServlets = new TreeMap<>();
Map<Class<? extends Filter>, String> extraFilters = new LinkedHashMap<>();
- SSLConfig sslConfig = null;
+ SSLConfig sslConfig;
int portRetryTime = 60;
+ {
Review Comment:
"instance initializer" -- https://blogs.oracle.com/javamagazine/post/java-instance-initializer-block
But yes I agree a field initializer can and should be used. I pushed this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Tests: JettyConfig.Builder.sslConfig now self inits [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #2318:
URL: https://github.com/apache/solr/pull/2318#discussion_r1506331229
##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBadInputTest.java:
##########
Review Comment:
nice!
##########
solr/test-framework/src/java/org/apache/solr/util/SolrJettyTestRule.java:
##########
@@ -70,12 +69,7 @@ public void reset() {
@Override
public void startSolr(Path solrHome) {
- startSolr(
- solrHome,
- new Properties(),
- JettyConfig.builder()
- .withSSLConfig(SolrTestCaseJ4.sslConfig.buildServerSSLConfig())
- .build());
+ startSolr(solrHome, new Properties(), JettyConfig.builder().build());
Review Comment:
i like how much shorter this is!
##########
solr/test-framework/src/java/org/apache/solr/embedded/JettyConfig.java:
##########
@@ -84,9 +86,14 @@ public static class Builder {
Long waitForLoadingCoresToFinishMs = 300000L;
Map<ServletHolder, String> extraServlets = new TreeMap<>();
Map<Class<? extends Filter>, String> extraFilters = new LinkedHashMap<>();
- SSLConfig sslConfig = null;
+ SSLConfig sslConfig;
int portRetryTime = 60;
+ {
Review Comment:
This use of `{` and `}` is new to me...
Would this have worked? And or be simpler?
```
SSLConfig sslConfig = SolrTestCaseJ4.sslConfig != null ? SolrTestCaseJ4.sslConfig.buildServerSSLConfig() : null;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Tests: JettyConfig.Builder.sslConfig now self inits [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley merged PR #2318:
URL: https://github.com/apache/solr/pull/2318
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org