Github user gerlowskija commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/425#discussion_r204598388
--- Diff: solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java ---
@@ -150,15 +150,13 @@ public void testBasic() throws Exception {
zkController.getZkClient().setData("/configs/conf1/solrconfig.xml",
new byte[0], true);
// we set the solrconfig to nothing, so this reload should fail
- try {
+ SolrException e = expectThrows(SolrException.class, () -> {
ignoreException("solrconfig.xml");
h.getCoreContainer().reload(h.getCore().getName());
- fail("The reloaded SolrCore did not pick up configs from zookeeper");
- } catch(SolrException e) {
- resetExceptionIgnores();
- assertTrue(e.getMessage().contains("Unable to reload core
[collection1]"));
- assertTrue(e.getCause().getMessage().contains("Error loading solr
config from solrconfig.xml"));
- }
+ });
+ resetExceptionIgnores();
--- End diff --
[0] This isn't behavior you introduced, but I would've expected this to be
in a `finally` block.
As I read this, if an IOException or anything else gets triggered by
reloading the core, our exception-ignoring will never be reset.
I'm not asking you to change anything here. Just musing aloud. Will look
into it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]