SOLR-12095: Missed a few calls to init().

This commit is contained in:
Andrzej Bialecki 2018-04-04 17:13:24 +02:00
parent ecc17f9023
commit 2bbd193691
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,7 @@ public class TestNodeAddedTrigger extends SimSolrCloudTestCase {
try (NodeAddedTrigger trigger = new NodeAddedTrigger("node_added_trigger")) { try (NodeAddedTrigger trigger = new NodeAddedTrigger("node_added_trigger")) {
trigger.configure(cluster.getLoader(), cluster, props); trigger.configure(cluster.getLoader(), cluster, props);
trigger.init();
trigger.setProcessor(noFirstRunProcessor); trigger.setProcessor(noFirstRunProcessor);
trigger.run(); trigger.run();
@ -250,6 +251,7 @@ public class TestNodeAddedTrigger extends SimSolrCloudTestCase {
// and assert that the new trigger still fires // and assert that the new trigger still fires
NodeAddedTrigger trigger = new NodeAddedTrigger("node_added_trigger"); NodeAddedTrigger trigger = new NodeAddedTrigger("node_added_trigger");
trigger.configure(cluster.getLoader(), cluster, props); trigger.configure(cluster.getLoader(), cluster, props);
trigger.init();
trigger.setProcessor(noFirstRunProcessor); trigger.setProcessor(noFirstRunProcessor);
trigger.run(); trigger.run();
@ -259,6 +261,7 @@ public class TestNodeAddedTrigger extends SimSolrCloudTestCase {
try (NodeAddedTrigger newTrigger = new NodeAddedTrigger("some_different_name")) { try (NodeAddedTrigger newTrigger = new NodeAddedTrigger("some_different_name")) {
newTrigger.configure(cluster.getLoader(), cluster, props); newTrigger.configure(cluster.getLoader(), cluster, props);
trigger.init();
try { try {
newTrigger.restoreState(trigger); newTrigger.restoreState(trigger);
fail("Trigger should only be able to restore state from an old trigger of the same name"); fail("Trigger should only be able to restore state from an old trigger of the same name");
@ -269,6 +272,7 @@ public class TestNodeAddedTrigger extends SimSolrCloudTestCase {
try (NodeAddedTrigger newTrigger = new NodeAddedTrigger("node_added_trigger")) { try (NodeAddedTrigger newTrigger = new NodeAddedTrigger("node_added_trigger")) {
newTrigger.configure(cluster.getLoader(), cluster, props); newTrigger.configure(cluster.getLoader(), cluster, props);
newTrigger.init();
AtomicBoolean fired = new AtomicBoolean(false); AtomicBoolean fired = new AtomicBoolean(false);
AtomicReference<TriggerEvent> eventRef = new AtomicReference<>(); AtomicReference<TriggerEvent> eventRef = new AtomicReference<>();
newTrigger.setProcessor(event -> { newTrigger.setProcessor(event -> {