egor-ryashin commented on a change in pull request #6349: maintenance mode for 
Historical
URL: https://github.com/apache/incubator-druid/pull/6349#discussion_r221291652
 
 

 ##########
 File path: 
server/src/test/java/org/apache/druid/server/coordinator/rules/LoadRuleTest.java
 ##########
 @@ -685,6 +685,210 @@ public void testMaxLoadingQueueSize()
     EasyMock.verify(throttler, mockBalancerStrategy);
   }
 
+  /**
+   * 2 servers in different tiers, the first is in maitenance mode.
+   * Should not load a segment to the server in maintenance mode.
+   */
+  @Test
+  public void testLoadDuringMaitenance()
+  {
+    final LoadQueuePeon mockPeon1 = createEmptyPeon();
+    final LoadQueuePeon mockPeon2 = createOneCallPeonMock();
+
+    LoadRule rule = createLoadRule(ImmutableMap.of(
+        "tier1", 1,
+        "tier2", 1
+    ));
+
+    final DataSegment segment = createDataSegment("foo");
+
+    
EasyMock.expect(mockBalancerStrategy.findNewSegmentHomeReplicator(EasyMock.anyObject(),
 EasyMock.anyObject()))
+            .andDelegateTo(balancerStrategy)
+            .times(1);
+
+    EasyMock.replay(mockPeon1, mockPeon2, mockBalancerStrategy);
+
+
+    DruidCluster druidCluster = new DruidCluster(
+        null,
+        ImmutableMap.of(
+            "tier1",
+            Stream.of(
 
 Review comment:
   :white_check_mark:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to