lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject [34/34] lucene-solr:jira/solr-12095: SOLR-12095: Fixing compilation errors after merging master
Date Mon, 02 Apr 2018 07:38:21 GMT
SOLR-12095: Fixing compilation errors after merging master


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d83fcbd1
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d83fcbd1
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d83fcbd1

Branch: refs/heads/jira/solr-12095
Commit: d83fcbd1f97115e4639268c9d0192c226202b288
Parents: 0796226
Author: Shalin Shekhar Mangar <shalin@apache.org>
Authored: Mon Apr 2 13:07:26 2018 +0530
Committer: Shalin Shekhar Mangar <shalin@apache.org>
Committed: Mon Apr 2 13:07:26 2018 +0530

----------------------------------------------------------------------
 .../NodeAddedTriggerIntegrationTest.java         |  5 ++---
 .../NodeLostTriggerIntegrationTest.java          |  5 ++---
 .../autoscaling/NodeMarkersRegistrationTest.java |  5 ++---
 .../autoscaling/RestoreTriggerStateTest.java     |  5 ++---
 .../TriggerCooldownIntegrationTest.java          |  4 ++--
 .../TriggerSetPropertiesIntegrationTest.java     | 19 ++++++++++++-------
 6 files changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d83fcbd1/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeAddedTriggerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeAddedTriggerIntegrationTest.java
b/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeAddedTriggerIntegrationTest.java
index ecf2437..ddc56ec 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeAddedTriggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeAddedTriggerIntegrationTest.java
@@ -19,7 +19,6 @@ package org.apache.solr.cloud.autoscaling;
 
 import java.lang.invoke.MethodHandles;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
@@ -291,10 +290,10 @@ public class NodeAddedTriggerIntegrationTest extends SolrCloudTestCase
{
     }
 
     @Override
-    public void init(Map<String, String> args) {
+    public void init() throws Exception {
       log.info("TestTriggerAction init");
       actionInitCalled.countDown();
-      super.init(args);
+      super.init();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d83fcbd1/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeLostTriggerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeLostTriggerIntegrationTest.java
b/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeLostTriggerIntegrationTest.java
index 6b1af65..b756dcd 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeLostTriggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeLostTriggerIntegrationTest.java
@@ -19,7 +19,6 @@ package org.apache.solr.cloud.autoscaling;
 
 import java.lang.invoke.MethodHandles;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
@@ -313,10 +312,10 @@ public class NodeLostTriggerIntegrationTest extends SolrCloudTestCase
{
     }
 
     @Override
-    public void init(Map<String, String> args) {
+    public void init() throws Exception {
       log.info("TestTriggerAction init");
       actionInitCalled.countDown();
-      super.init(args);
+      super.init();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d83fcbd1/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeMarkersRegistrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeMarkersRegistrationTest.java
b/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeMarkersRegistrationTest.java
index 38c2165..fe1c94f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeMarkersRegistrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/NodeMarkersRegistrationTest.java
@@ -20,7 +20,6 @@ package org.apache.solr.cloud.autoscaling;
 import java.lang.invoke.MethodHandles;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.concurrent.ConcurrentHashMap;
@@ -260,10 +259,10 @@ public class NodeMarkersRegistrationTest extends SolrCloudTestCase {
     }
 
     @Override
-    public void init(Map<String, String> args) {
+    public void init() throws Exception {
       log.info("TestEventMarkerAction init");
       actionInitCalled.countDown();
-      super.init(args);
+      super.init();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d83fcbd1/solr/core/src/test/org/apache/solr/cloud/autoscaling/RestoreTriggerStateTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/RestoreTriggerStateTest.java
b/solr/core/src/test/org/apache/solr/cloud/autoscaling/RestoreTriggerStateTest.java
index a3417cf..4949e6f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/RestoreTriggerStateTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/RestoreTriggerStateTest.java
@@ -19,7 +19,6 @@ package org.apache.solr.cloud.autoscaling;
 
 import java.lang.invoke.MethodHandles;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
@@ -160,10 +159,10 @@ public class RestoreTriggerStateTest extends SolrCloudTestCase {
     }
 
     @Override
-    public void init(Map<String, String> args) {
+    public void init() throws Exception {
       log.info("TestTriggerAction init");
       actionInitCalled.countDown();
-      super.init(args);
+      super.init();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d83fcbd1/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerCooldownIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerCooldownIntegrationTest.java
b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerCooldownIntegrationTest.java
index 8d69bad..e6e4116 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerCooldownIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerCooldownIntegrationTest.java
@@ -214,10 +214,10 @@ public class TriggerCooldownIntegrationTest extends SolrCloudTestCase
{
     }
 
     @Override
-    public void init(Map<String, String> args) {
+    public void init() throws Exception {
       log.info("TestTriggerAction init");
       actionInitCalled.countDown();
-      super.init(args);
+      super.init();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d83fcbd1/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerSetPropertiesIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerSetPropertiesIntegrationTest.java
b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerSetPropertiesIntegrationTest.java
index 5f4243f..0ee0e1c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerSetPropertiesIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerSetPropertiesIntegrationTest.java
@@ -80,7 +80,7 @@ public class TriggerSetPropertiesIntegrationTest extends SolrCloudTestCase
{
     try (ScheduledTriggers scheduledTriggers = new ScheduledTriggers(resourceLoader, solrCloudManager))
{
       AutoScalingConfig config = new AutoScalingConfig(Collections.emptyMap());
       scheduledTriggers.setAutoScalingConfig(config);
-      scheduledTriggers.add(new TriggerBase(TriggerEventType.NODELOST, "x", Collections.emptyMap(),
resourceLoader, solrCloudManager) {
+      AutoScaling.Trigger t = new TriggerBase(TriggerEventType.NODELOST, "x") {
         @Override
         protected Map<String, Object> getState() {
           return Collections.singletonMap("x", "y");
@@ -103,7 +103,10 @@ public class TriggerSetPropertiesIntegrationTest extends SolrCloudTestCase
{
           diff.set(timeSource.getTimeNs() - l);
           getTriggerFiredLatch().countDown();
         }
-      });
+      };
+      t.configure(runner.getCoreContainer().getResourceLoader(), runner.getCoreContainer().getZkController().getSolrCloudManager(),
Collections.emptyMap());
+      scheduledTriggers.add(t);
+
       assertTrue(getTriggerFiredLatch().await(4, TimeUnit.SECONDS));
       assertTrue(diff.get() - TimeUnit.SECONDS.toNanos(ScheduledTriggers.DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS)
>= 0);
 
@@ -125,7 +128,7 @@ public class TriggerSetPropertiesIntegrationTest extends SolrCloudTestCase
{
       final Set<String> triggerNames = Collections.synchronizedSet(new HashSet<>());
       triggerFiredLatch = new CountDownLatch(8);
       for (int i = 0; i < 8; i++) {
-        triggerList.add(new MockTrigger(TriggerEventType.NODELOST, "x" + i, Collections.emptyMap(),
resourceLoader, solrCloudManager) {
+        AutoScaling.Trigger trigger = new MockTrigger(TriggerEventType.NODELOST, "x" + i)
 {
           @Override
           public void run() {
             try {
@@ -140,8 +143,10 @@ public class TriggerSetPropertiesIntegrationTest extends SolrCloudTestCase
{
               threadNames.add(Thread.currentThread().getName());
             }
           }
-        });
-        scheduledTriggers.add(triggerList.get(i));
+        };
+        trigger.configure(resourceLoader, solrCloudManager, Collections.emptyMap());
+        triggerList.add(trigger);
+        scheduledTriggers.add(trigger);
       }
       assertTrue("Timed out waiting for latch to fire", getTriggerFiredLatch().await(20,
TimeUnit.SECONDS));
       assertEquals("Expected 8 triggers but found: " + triggerNames, 8, triggerNames.size());
@@ -168,8 +173,8 @@ public class TriggerSetPropertiesIntegrationTest extends SolrCloudTestCase
{
 
   public static class MockTrigger extends TriggerBase {
 
-    public MockTrigger(TriggerEventType eventType, String name, Map<String, Object>
properties, SolrResourceLoader loader, SolrCloudManager cloudManager) {
-      super(eventType, name, properties, loader, cloudManager);
+    public MockTrigger(TriggerEventType eventType, String name) {
+      super(eventType, name);
     }
 
     @Override


Mime
View raw message